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

Side by Side Diff: test/cctest/BUILD.gn

Issue 2171263002: [gn] Migrate more custom cflags from gyp to gn (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: gn format test/cctest/BUILD.gn --in-place Created 4 years, 5 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 | « no previous file | 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 2016 The V8 project authors. All rights reserved. 1 # Copyright 2016 The V8 project 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 sources are kept automatically in sync with cctest.gyp. 5 # The sources are kept automatically in sync with cctest.gyp.
6 6
7 import("../../gni/v8.gni") 7 import("../../gni/v8.gni")
8 8
9 gypi_values = exec_script("//build/gypi_to_gn.py", 9 gypi_values = exec_script("//build/gypi_to_gn.py",
10 [ rebase_path("cctest.gyp") ], 10 [ rebase_path("cctest.gyp") ],
11 "scope", 11 "scope",
12 [ "cctest.gyp" ]) 12 [ "cctest.gyp" ])
13 13
14 v8_executable("cctest") { 14 v8_executable("cctest") {
15 testonly = true 15 testonly = true
16 16
17 sources = [ 17 sources = [ "$target_gen_dir/resources.cc" ] + gypi_values.cctest_sources
18 "$target_gen_dir/resources.cc",
19 ] + gypi_values.cctest_sources
20 18
21 if (v8_current_cpu == "arm") { 19 if (v8_current_cpu == "arm") {
22 sources += gypi_values.cctest_sources_arm 20 sources += gypi_values.cctest_sources_arm
23 } else if (v8_current_cpu == "arm64") { 21 } else if (v8_current_cpu == "arm64") {
24 sources += gypi_values.cctest_sources_arm64 22 sources += gypi_values.cctest_sources_arm64
25 } else if (v8_current_cpu == "x86") { 23 } else if (v8_current_cpu == "x86") {
26 sources += gypi_values.cctest_sources_ia32 24 sources += gypi_values.cctest_sources_ia32
27 } else if (v8_current_cpu == "mips") { 25 } else if (v8_current_cpu == "mips") {
28 sources += gypi_values.cctest_sources_mips 26 sources += gypi_values.cctest_sources_mips
29 } else if (v8_current_cpu == "mipsel") { 27 } else if (v8_current_cpu == "mipsel") {
(...skipping 10 matching lines...) Expand all
40 sources += gypi_values.cctest_sources_ppc 38 sources += gypi_values.cctest_sources_ppc
41 } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { 39 } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
42 sources += gypi_values.cctest_sources_s390 40 sources += gypi_values.cctest_sources_s390
43 } 41 }
44 42
45 if (is_linux) { 43 if (is_linux) {
46 # TODO(machenbach): Translate 'or OS=="qnx"' from gyp. 44 # TODO(machenbach): Translate 'or OS=="qnx"' from gyp.
47 sources += [ "test-platform-linux.cc" ] 45 sources += [ "test-platform-linux.cc" ]
48 } else if (is_win) { 46 } else if (is_win) {
49 sources += [ "test-platform-win32.cc" ] 47 sources += [ "test-platform-win32.cc" ]
50 # TODO(machenbach): Translate from gyp.
51 # "msvs_settings": {
52 # "VCCLCompilerTool": {
53 # # MSVS wants this for gay-{precision,shortest}.cc.
54 # "AdditionalOptions": ["/bigobj"],
55 # },
56 # },
57 } 48 }
58 49
59 configs = [ 50 configs = [
60 "../..:external_config", 51 "../..:external_config",
61 "../..:internal_config_base", 52 "../..:internal_config_base",
62 ] 53 ]
63 54
64 # TODO(machenbach): Translate from gyp. 55 # TODO(machenbach): Translate from gyp.
65 #['v8_current_cpu=="ppc" or v8_current_cpu=="ppc64" \
66 # or v8_current_cpu=="arm" or v8_current_cpu=="arm64" \
67 # or v8_current_cpu=="s390" or v8_current_cpu=="s390x"', {
68 # # disable fmadd/fmsub so that expected results match generated code in
69 # # RunFloat64MulAndFloat64Add1 and friends.
70 # 'cflags': ['-ffp-contract=off'],
71 #}],
72
73 # TODO(machenbach): Translate from gyp.
74 #["OS=="aix"", { 56 #["OS=="aix"", {
75 # "ldflags": [ "-Wl,-bbigtoc" ], 57 # "ldflags": [ "-Wl,-bbigtoc" ],
76 #}], 58 #}],
77 59
78 deps = [ 60 deps = [
79 ":resources", 61 ":resources",
80 "../..:v8_libplatform", 62 "../..:v8_libplatform",
81 "//build/config/sanitizers:deps", 63 "//build/config/sanitizers:deps",
82 "//build/win:default_exe_manifest", 64 "//build/win:default_exe_manifest",
83 ] 65 ]
84 66
85 if (is_component_build) { 67 if (is_component_build) {
86 # cctest can't be built against a shared library, so we 68 # cctest can't be built against a shared library, so we
87 # need to depend on the underlying static target in that case. 69 # need to depend on the underlying static target in that case.
88 deps += [ "../..:v8_maybe_snapshot" ] 70 deps += [ "../..:v8_maybe_snapshot" ]
89 } else { 71 } else {
90 deps += [ "../..:v8" ] 72 deps += [ "../..:v8" ]
91 } 73 }
92 74
75 cflags = []
76 ldflags = []
77
78 if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" ||
79 v8_current_cpu == "arm" || v8_current_cpu == "arm64" ||
80 v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
81 # Disable fmadd/fmsub so that expected results match generated code in
82 # RunFloat64MulAndFloat64Add1 and friends.
83 cflags += [ "-ffp-contract=off" ]
84 }
85
93 if (is_win) { 86 if (is_win) {
94 # This warning is benignly triggered by the U16 and U32 macros in 87 # This warning is benignly triggered by the U16 and U32 macros in
95 # bytecode-utils.h. 88 # bytecode-utils.h.
96 # C4309: 'static_cast': truncation of constant value 89 # C4309: 'static_cast': truncation of constant value
97 cflags = [ "/wd4309" ] 90 cflags += [ "/wd4309" ]
91
92 # MSVS wants this for gay-{precision,shortest}.cc.
93 cflags += [ "/bigobj" ]
98 94
99 # Suppress warnings about importing locally defined symbols. 95 # Suppress warnings about importing locally defined symbols.
100 if (is_component_build) { 96 if (is_component_build) {
101 ldflags = [ 97 ldflags += [
102 "/ignore:4049", 98 "/ignore:4049",
103 "/ignore:4217", 99 "/ignore:4217",
104 ] 100 ]
105 } 101 }
106 } 102 }
107 } 103 }
108 104
109 action("resources") { 105 action("resources") {
110 visibility = [ ":*" ] # Only targets in this file can depend on this. 106 visibility = [ ":*" ] # Only targets in this file can depend on this.
111 107
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 "//build/win:default_exe_manifest", 154 "//build/win:default_exe_manifest",
159 ] 155 ]
160 156
161 if (is_component_build) { 157 if (is_component_build) {
162 # Same as cctest, we need to depend on the underlying static target. 158 # Same as cctest, we need to depend on the underlying static target.
163 deps += [ "../..:v8_maybe_snapshot" ] 159 deps += [ "../..:v8_maybe_snapshot" ]
164 } else { 160 } else {
165 deps += [ "../..:v8" ] 161 deps += [ "../..:v8" ]
166 } 162 }
167 } 163 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698