OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 '<(shared_generated_dir)/x86cpu.c', | 151 '<(shared_generated_dir)/x86cpu.c', |
152 '<(shared_generated_dir)/x86regtmod.c', | 152 '<(shared_generated_dir)/x86regtmod.c', |
153 ], | 153 ], |
154 'include_dirs': [ | 154 'include_dirs': [ |
155 '<@(yasm_include_dirs)', | 155 '<@(yasm_include_dirs)', |
156 '<(shared_generated_dir)', | 156 '<(shared_generated_dir)', |
157 '<(generated_dir)', | 157 '<(generated_dir)', |
158 ], | 158 ], |
159 'defines': [ '<@(yasm_defines)' ], | 159 'defines': [ '<@(yasm_defines)' ], |
160 'cflags': [ '<@(yasm_cflags)', ], | 160 'cflags': [ '<@(yasm_cflags)', ], |
| 161 'conditions': [ |
| 162 ['clang==1', { |
| 163 'xcode_settings': { |
| 164 'WARNING_CFLAGS': [ |
| 165 # yasm passes a `const elf_machine_sym*` through `void*`. |
| 166 '-Wno-incompatible-pointer-types', |
| 167 ], |
| 168 }, |
| 169 'cflags': [ |
| 170 '-Wno-incompatible-pointer-types', |
| 171 ], |
| 172 }], |
| 173 ], |
161 'rules': [ | 174 'rules': [ |
162 { | 175 { |
163 'rule_name': 'generate_gperf', | 176 'rule_name': 'generate_gperf', |
164 'extension': 'gperf', | 177 'extension': 'gperf', |
165 'inputs': [ '<(PRODUCT_DIR)/' | 178 'inputs': [ '<(PRODUCT_DIR)/' |
166 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ], | 179 '<(EXECUTABLE_PREFIX)genperf<(EXECUTABLE_SUFFIX)' ], |
167 'outputs': [ | 180 'outputs': [ |
168 '<(generated_dir)/<(RULE_INPUT_ROOT).c', | 181 '<(generated_dir)/<(RULE_INPUT_ROOT).c', |
169 ], | 182 ], |
170 'action': ['<(PRODUCT_DIR)/genperf', | 183 'action': ['<(PRODUCT_DIR)/genperf', |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 'source/patched-yasm/tools/re2c/mbo_getopt.c', | 533 'source/patched-yasm/tools/re2c/mbo_getopt.c', |
521 'source/patched-yasm/tools/re2c/substr.c', | 534 'source/patched-yasm/tools/re2c/substr.c', |
522 'source/patched-yasm/tools/re2c/translate.c', | 535 'source/patched-yasm/tools/re2c/translate.c', |
523 ], | 536 ], |
524 'include_dirs': [ | 537 'include_dirs': [ |
525 '<@(yasm_include_dirs)', | 538 '<@(yasm_include_dirs)', |
526 ], | 539 ], |
527 'cflags': [ | 540 'cflags': [ |
528 '-std=gnu99', | 541 '-std=gnu99', |
529 ], | 542 ], |
| 543 'conditions': [ |
| 544 ['clang==1', { |
| 545 'xcode_settings': { |
| 546 'WARNING_CFLAGS': [ |
| 547 # re2c is missing CLOSEVOP from one switch. |
| 548 '-Wno-switch-enum', |
| 549 ], |
| 550 }, |
| 551 'cflags': [ |
| 552 '-Wno-switch-enum', |
| 553 ], |
| 554 }], |
| 555 ], |
530 }, | 556 }, |
531 { | 557 { |
532 'target_name': 'genmodule', | 558 'target_name': 'genmodule', |
533 'type': 'executable', | 559 'type': 'executable', |
534 'toolsets': ['host'], | 560 'toolsets': ['host'], |
535 'dependencies': [ | 561 'dependencies': [ |
536 'config_sources', | 562 'config_sources', |
537 ], | 563 ], |
538 'sources': [ | 564 'sources': [ |
539 'source/patched-yasm/libyasm/genmodule.c', | 565 'source/patched-yasm/libyasm/genmodule.c', |
540 ], | 566 ], |
541 'include_dirs': [ | 567 'include_dirs': [ |
542 '<@(yasm_include_dirs)', | 568 '<@(yasm_include_dirs)', |
543 | 569 |
544 ], | 570 ], |
545 'cflags': [ | 571 'cflags': [ |
546 '-std=gnu99', | 572 '-std=gnu99', |
547 ], | 573 ], |
548 }, | 574 }, |
549 ], | 575 ], |
550 } | 576 } |
OLD | NEW |