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

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

Issue 1126703005: Fix ASAN build in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « mandoline/ui/aura/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)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 executable("genmacro") { 49 executable("genmacro") {
50 sources = [ 50 sources = [
51 "source/patched-yasm/tools/genmacro/genmacro.c", 51 "source/patched-yasm/tools/genmacro/genmacro.c",
52 ] 52 ]
53 configs -= [ "//build/config/compiler:chromium_code" ] 53 configs -= [ "//build/config/compiler:chromium_code" ]
54 configs += [ 54 configs += [
55 ":yasm_config", 55 ":yasm_config",
56 "//build/config/compiler:no_chromium_code", 56 "//build/config/compiler:no_chromium_code",
57 ] 57 ]
58 deps = [
59 "//build/config/sanitizers:deps",
60 ]
58 } 61 }
59 62
60 executable("genmodule") { 63 executable("genmodule") {
61 sources = [ 64 sources = [
62 "source/patched-yasm/libyasm/genmodule.c", 65 "source/patched-yasm/libyasm/genmodule.c",
63 ] 66 ]
64 configs -= [ "//build/config/compiler:chromium_code" ] 67 configs -= [ "//build/config/compiler:chromium_code" ]
65 configs += [ 68 configs += [
66 ":yasm_config", 69 ":yasm_config",
67 "//build/config/compiler:no_chromium_code", 70 "//build/config/compiler:no_chromium_code",
68 ] 71 ]
72 deps = [
73 "//build/config/sanitizers:deps",
74 ]
69 } 75 }
70 76
71 executable("genperf") { 77 executable("genperf") {
72 sources = [ 78 sources = [
73 "source/patched-yasm/tools/genperf/genperf.c", 79 "source/patched-yasm/tools/genperf/genperf.c",
74 "source/patched-yasm/tools/genperf/perfect.c", 80 "source/patched-yasm/tools/genperf/perfect.c",
75 ] 81 ]
76 82
77 configs -= [ "//build/config/compiler:chromium_code" ] 83 configs -= [ "//build/config/compiler:chromium_code" ]
78 configs += [ 84 configs += [
79 ":yasm_config", 85 ":yasm_config",
80 "//build/config/compiler:no_chromium_code", 86 "//build/config/compiler:no_chromium_code",
81 ] 87 ]
82 88
83 deps = [ 89 deps = [
84 ":yasm_utils", 90 ":yasm_utils",
91 "//build/config/sanitizers:deps",
85 ] 92 ]
86 } 93 }
87 94
88 # Used by both yasm and genperf binaries. 95 # Used by both yasm and genperf binaries.
89 source_set("yasm_utils") { 96 source_set("yasm_utils") {
90 sources = [ 97 sources = [
91 "source/patched-yasm/libyasm/phash.c", 98 "source/patched-yasm/libyasm/phash.c",
92 "source/patched-yasm/libyasm/xmalloc.c", 99 "source/patched-yasm/libyasm/xmalloc.c",
93 "source/patched-yasm/libyasm/xstrdup.c", 100 "source/patched-yasm/libyasm/xstrdup.c",
94 ] 101 ]
95 102
96 configs -= [ "//build/config/compiler:chromium_code" ] 103 configs -= [ "//build/config/compiler:chromium_code" ]
97 configs += [ 104 configs += [
98 ":yasm_config", 105 ":yasm_config",
99 "//build/config/compiler:no_chromium_code", 106 "//build/config/compiler:no_chromium_code",
100 ] 107 ]
101 } 108 }
102 109
103 executable("genstring") { 110 executable("genstring") {
104 sources = [ 111 sources = [
105 "source/patched-yasm/genstring.c", 112 "source/patched-yasm/genstring.c",
106 ] 113 ]
107 configs -= [ "//build/config/compiler:chromium_code" ] 114 configs -= [ "//build/config/compiler:chromium_code" ]
108 configs += [ 115 configs += [
109 ":yasm_config", 116 ":yasm_config",
110 "//build/config/compiler:no_chromium_code", 117 "//build/config/compiler:no_chromium_code",
111 ] 118 ]
119 deps = [
120 "//build/config/sanitizers:deps",
121 ]
112 } 122 }
113 123
114 executable("genversion") { 124 executable("genversion") {
115 sources = [ 125 sources = [
116 "source/patched-yasm/modules/preprocs/nasm/genversion.c", 126 "source/patched-yasm/modules/preprocs/nasm/genversion.c",
117 ] 127 ]
118 configs -= [ "//build/config/compiler:chromium_code" ] 128 configs -= [ "//build/config/compiler:chromium_code" ]
119 configs += [ 129 configs += [
120 ":yasm_config", 130 ":yasm_config",
121 "//build/config/compiler:no_chromium_code", 131 "//build/config/compiler:no_chromium_code",
122 ] 132 ]
133 deps = [
134 "//build/config/sanitizers:deps",
135 ]
123 } 136 }
124 137
125 executable("re2c") { 138 executable("re2c") {
126 sources = [ 139 sources = [
127 "source/patched-yasm/tools/re2c/actions.c", 140 "source/patched-yasm/tools/re2c/actions.c",
128 "source/patched-yasm/tools/re2c/code.c", 141 "source/patched-yasm/tools/re2c/code.c",
129 "source/patched-yasm/tools/re2c/dfa.c", 142 "source/patched-yasm/tools/re2c/dfa.c",
130 "source/patched-yasm/tools/re2c/main.c", 143 "source/patched-yasm/tools/re2c/main.c",
131 "source/patched-yasm/tools/re2c/mbo_getopt.c", 144 "source/patched-yasm/tools/re2c/mbo_getopt.c",
132 "source/patched-yasm/tools/re2c/parser.c", 145 "source/patched-yasm/tools/re2c/parser.c",
133 "source/patched-yasm/tools/re2c/scanner.c", 146 "source/patched-yasm/tools/re2c/scanner.c",
134 "source/patched-yasm/tools/re2c/substr.c", 147 "source/patched-yasm/tools/re2c/substr.c",
135 "source/patched-yasm/tools/re2c/translate.c", 148 "source/patched-yasm/tools/re2c/translate.c",
136 ] 149 ]
137 150
138 configs -= [ "//build/config/compiler:chromium_code" ] 151 configs -= [ "//build/config/compiler:chromium_code" ]
139 configs += [ 152 configs += [
140 ":yasm_config", 153 ":yasm_config",
141 "//build/config/compiler:no_chromium_code", 154 "//build/config/compiler:no_chromium_code",
142 ] 155 ]
143 156
144 # re2c is missing CLOSEVOP from one switch. 157 # re2c is missing CLOSEVOP from one switch.
145 if (is_posix) { 158 if (is_posix) {
146 cflags = [ "-Wno-switch" ] 159 cflags = [ "-Wno-switch" ]
147 } 160 }
161 deps = [
162 "//build/config/sanitizers:deps",
163 ]
148 } 164 }
149 165
150 executable("yasm") { 166 executable("yasm") {
151 sources = [ 167 sources = [
152 "source/patched-yasm/frontends/yasm/yasm-options.c", 168 "source/patched-yasm/frontends/yasm/yasm-options.c",
153 "source/patched-yasm/frontends/yasm/yasm.c", 169 "source/patched-yasm/frontends/yasm/yasm.c",
154 "source/patched-yasm/libyasm/assocdat.c", 170 "source/patched-yasm/libyasm/assocdat.c",
155 "source/patched-yasm/libyasm/bc-align.c", 171 "source/patched-yasm/libyasm/bc-align.c",
156 "source/patched-yasm/libyasm/bc-data.c", 172 "source/patched-yasm/libyasm/bc-data.c",
157 "source/patched-yasm/libyasm/bc-incbin.c", 173 "source/patched-yasm/libyasm/bc-incbin.c",
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 ":compile_nasm_macros", 276 ":compile_nasm_macros",
261 ":compile_nasm_version", 277 ":compile_nasm_version",
262 ":compile_re2c_lc3b", 278 ":compile_re2c_lc3b",
263 ":compile_win64_gas", 279 ":compile_win64_gas",
264 ":compile_win64_nasm", 280 ":compile_win64_nasm",
265 ":compile_re2c", 281 ":compile_re2c",
266 ":generate_license", 282 ":generate_license",
267 ":generate_module", 283 ":generate_module",
268 ":generate_version", 284 ":generate_version",
269 ":yasm_utils", 285 ":yasm_utils",
286 "//build/config/sanitizers:deps",
270 ] 287 ]
271 } 288 }
272 289
273 compiled_action_foreach("compile_gperf") { 290 compiled_action_foreach("compile_gperf") {
274 tool = ":genperf" 291 tool = ":genperf"
275 sources = [ 292 sources = [
276 "source/patched-yasm/modules/arch/x86/x86cpu.gperf", 293 "source/patched-yasm/modules/arch/x86/x86cpu.gperf",
277 "source/patched-yasm/modules/arch/x86/x86regtmod.gperf", 294 "source/patched-yasm/modules/arch/x86/x86regtmod.gperf",
278 ] 295 ]
279 296
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 480
464 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c 481 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c
465 outputs = [ 482 outputs = [
466 "$yasm_gen_include_dir/x86insns.c", 483 "$yasm_gen_include_dir/x86insns.c",
467 "$yasm_gen_include_dir/x86insn_gas.gperf", 484 "$yasm_gen_include_dir/x86insn_gas.gperf",
468 "$yasm_gen_include_dir/x86insn_nasm.gperf", 485 "$yasm_gen_include_dir/x86insn_nasm.gperf",
469 ] 486 ]
470 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] 487 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ]
471 } 488 }
472 } 489 }
OLDNEW
« no previous file with comments | « mandoline/ui/aura/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698