Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: third_party/yasm/BUILD.gn

Issue 1880113003: Enable /GL for all targets in Official (behind a flag) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/mesa/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # The yasm build process creates a slew of small C subprograms that 5 # The yasm build process creates a slew of small C subprograms that
6 # dynamically generate files at various point in the build process. This makes 6 # dynamically generate files at various point in the build process. This makes
7 # the build integration moderately complex. 7 # the build integration moderately complex.
8 # 8 #
9 # There are three classes of dynamically generated files: 9 # There are three classes of dynamically generated files:
10 # 1) C source files that should be included in the build (eg., lc3bid.c) 10 # 1) C source files that should be included in the build (eg., lc3bid.c)
11 # 2) C source files that are #included by static C sources (eg., license.c) 11 # 2) C source files that are #included by static C sources (eg., license.c)
12 # 3) Intermediate files that are used as input by other subprograms to 12 # 3) Intermediate files that are used as input by other subprograms to
13 # further generate files in category #1 or #2. (eg., version.mac) 13 # further generate files in category #1 or #2. (eg., version.mac)
14 # 14 #
15 # This structure is represented with the following targets: 15 # This structure is represented with the following targets:
16 # 1) yasm -- Sources, flags for the main yasm executable. Also has most of 16 # 1) yasm -- Sources, flags for the main yasm executable. Also has most of
17 # of the actions and rules that invoke the subprograms. 17 # of the actions and rules that invoke the subprograms.
18 # 2) yasm_config -- General build configuration including setting a 18 # 2) yasm_config -- General build configuration including setting a
19 # inputs listing the checked in version of files 19 # inputs listing the checked in version of files
20 # generated by manually running configure. These manually 20 # generated by manually running configure. These manually
21 # generated files are used by all binaries. 21 # generated files are used by all binaries.
22 # 3) yasm_utils -- Object files with memory management and hashing utilities 22 # 3) yasm_utils -- Object files with memory management and hashing utilities
23 # shared between yasm and the genperf subprogram. 23 # shared between yasm and the genperf subprogram.
24 # 4) genmacro, genmodule, etc. -- One executable target for each subprogram. 24 # 4) genmacro, genmodule, etc. -- One executable target for each subprogram.
25 # 5) generate_license, generate_module, etc. -- Actions that invoke programs 25 # 5) generate_license, generate_module, etc. -- Actions that invoke programs
26 # built in #4 to generate .c files. 26 # built in #4 to generate .c files.
27 # 6) compile_gperf, compile_re2c, etc. -- Actions that invoke programs that 27 # 6) compile_gperf, compile_re2c, etc. -- Actions that invoke programs that
28 # turn intermediate files into .c files. 28 # turn intermediate files into .c files.
29 29
30 import("//build/config/compiler/compiler.gni")
31
30 if (current_toolchain == host_toolchain) { 32 if (current_toolchain == host_toolchain) {
31 # Various files referenced by multiple targets. 33 # Various files referenced by multiple targets.
32 yasm_gen_include_dir = "$target_gen_dir/include" 34 yasm_gen_include_dir = "$target_gen_dir/include"
33 config_makefile = "source/config/$host_os/Makefile" 35 config_makefile = "source/config/$host_os/Makefile"
34 version_file = "version.mac" 36 version_file = "version.mac"
35 37
36 import("//build/compiled_action.gni") 38 import("//build/compiled_action.gni")
37 39
38 config("yasm_config") { 40 config("yasm_config") {
39 include_dirs = [ 41 include_dirs = [
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 configs += [ 292 configs += [
291 ":yasm_config", 293 ":yasm_config",
292 "//build/config/compiler:no_chromium_code", 294 "//build/config/compiler:no_chromium_code",
293 "//build/config/compiler:no_incompatible_pointer_warnings", 295 "//build/config/compiler:no_incompatible_pointer_warnings",
294 296
295 # Must be after no_chromium_code for warning flags to be ordered 297 # Must be after no_chromium_code for warning flags to be ordered
296 # correctly. 298 # correctly.
297 ":yasm_warnings", 299 ":yasm_warnings",
298 ] 300 ]
299 301
302 # Disable WPO for yasm: crbug.com/604808
303 if (is_official_build && full_wpo_on_official) {
304 configs -= [ "//build/config/compiler:default_optimization" ]
305 configs += [ "//build/config/compiler:optimize_no_wpo" ]
306 }
307
300 # Yasm generates a bunch of .c files which its source file #include. 308 # Yasm generates a bunch of .c files which its source file #include.
301 # Add the |target_gen_dir| into the include path so it can find them. 309 # Add the |target_gen_dir| into the include path so it can find them.
302 # Ideally, these generated .c files would be placed into a separate 310 # Ideally, these generated .c files would be placed into a separate
303 # directory, but the gen_x86_insn.py script does not make this easy. 311 # directory, but the gen_x86_insn.py script does not make this easy.
304 include_dirs = [ yasm_gen_include_dir ] 312 include_dirs = [ yasm_gen_include_dir ]
305 313
306 if (!is_win) { 314 if (!is_win) {
307 cflags = [ 315 cflags = [
308 "-std=c89", 316 "-std=c89",
309 "-pedantic", 317 "-pedantic",
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 533
526 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c 534 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c
527 outputs = [ 535 outputs = [
528 "$yasm_gen_include_dir/x86insns.c", 536 "$yasm_gen_include_dir/x86insns.c",
529 "$yasm_gen_include_dir/x86insn_gas.gperf", 537 "$yasm_gen_include_dir/x86insn_gas.gperf",
530 "$yasm_gen_include_dir/x86insn_nasm.gperf", 538 "$yasm_gen_include_dir/x86insn_nasm.gperf",
531 ] 539 ]
532 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] 540 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ]
533 } 541 }
534 } 542 }
OLDNEW
« no previous file with comments | « third_party/mesa/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698