| OLD | NEW |
| 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 = [ |
| 18 "$target_gen_dir/resources.cc", | 18 "$target_gen_dir/resources.cc", |
| 19 ] + gypi_values.cctest_sources | 19 ] + gypi_values.cctest_sources |
| 20 | 20 |
| 21 if (v8_target_cpu == "arm") { | 21 if (v8_current_cpu == "arm") { |
| 22 sources += gypi_values.cctest_sources_arm | 22 sources += gypi_values.cctest_sources_arm |
| 23 } else if (v8_target_cpu == "arm64") { | 23 } else if (v8_current_cpu == "arm64") { |
| 24 sources += gypi_values.cctest_sources_arm64 | 24 sources += gypi_values.cctest_sources_arm64 |
| 25 } else if (v8_target_cpu == "x86") { | 25 } else if (v8_current_cpu == "x86") { |
| 26 sources += gypi_values.cctest_sources_ia32 | 26 sources += gypi_values.cctest_sources_ia32 |
| 27 } else if (v8_target_cpu == "mips") { | 27 } else if (v8_current_cpu == "mips") { |
| 28 sources += gypi_values.cctest_sources_mips | 28 sources += gypi_values.cctest_sources_mips |
| 29 } else if (v8_target_cpu == "mipsel") { | 29 } else if (v8_current_cpu == "mipsel") { |
| 30 sources += gypi_values.cctest_sources_mipsel | 30 sources += gypi_values.cctest_sources_mipsel |
| 31 } else if (v8_target_cpu == "mips64") { | 31 } else if (v8_current_cpu == "mips64") { |
| 32 sources += gypi_values.cctest_sources_mips64 | 32 sources += gypi_values.cctest_sources_mips64 |
| 33 } else if (v8_target_cpu == "mips64el") { | 33 } else if (v8_current_cpu == "mips64el") { |
| 34 sources += gypi_values.cctest_sources_mips64el | 34 sources += gypi_values.cctest_sources_mips64el |
| 35 } else if (v8_target_cpu == "x64") { | 35 } else if (v8_current_cpu == "x64") { |
| 36 sources += gypi_values.cctest_sources_x64 | 36 sources += gypi_values.cctest_sources_x64 |
| 37 } else if (v8_target_cpu == "x87") { | 37 } else if (v8_current_cpu == "x87") { |
| 38 sources += gypi_values.cctest_sources_x87 | 38 sources += gypi_values.cctest_sources_x87 |
| 39 } else if (v8_target_cpu == "ppc" || v8_target_cpu == "ppc64") { | 39 } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { |
| 40 sources += gypi_values.cctest_sources_ppc | 40 sources += gypi_values.cctest_sources_ppc |
| 41 } else if (v8_target_cpu == "s390" || v8_target_cpu == "s390x") { | 41 } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { |
| 42 sources += gypi_values.cctest_sources_s390 | 42 sources += gypi_values.cctest_sources_s390 |
| 43 } | 43 } |
| 44 | 44 |
| 45 if (is_linux) { | 45 if (is_linux) { |
| 46 # TODO(machenbach): Translate 'or OS=="qnx"' from gyp. | 46 # TODO(machenbach): Translate 'or OS=="qnx"' from gyp. |
| 47 sources += [ "test-platform-linux.cc" ] | 47 sources += [ "test-platform-linux.cc" ] |
| 48 } else if (is_win) { | 48 } else if (is_win) { |
| 49 sources += [ "test-platform-win32.cc" ] | 49 sources += [ "test-platform-win32.cc" ] |
| 50 # TODO(machenbach): Translate from gyp. | 50 # TODO(machenbach): Translate from gyp. |
| 51 # "msvs_settings": { | 51 # "msvs_settings": { |
| 52 # "VCCLCompilerTool": { | 52 # "VCCLCompilerTool": { |
| 53 # # MSVS wants this for gay-{precision,shortest}.cc. | 53 # # MSVS wants this for gay-{precision,shortest}.cc. |
| 54 # "AdditionalOptions": ["/bigobj"], | 54 # "AdditionalOptions": ["/bigobj"], |
| 55 # }, | 55 # }, |
| 56 # }, | 56 # }, |
| 57 } | 57 } |
| 58 | 58 |
| 59 configs = [ | 59 configs = [ |
| 60 "../..:external_config", | 60 "../..:external_config", |
| 61 "../..:internal_config_base", | 61 "../..:internal_config_base", |
| 62 ] | 62 ] |
| 63 | 63 |
| 64 # TODO(machenbach): Translate from gyp. | 64 # TODO(machenbach): Translate from gyp. |
| 65 #['v8_target_cpu=="ppc" or v8_target_cpu=="ppc64" \ | 65 #['v8_current_cpu=="ppc" or v8_current_cpu=="ppc64" \ |
| 66 # or v8_target_cpu=="arm" or v8_target_cpu=="arm64" \ | 66 # or v8_current_cpu=="arm" or v8_current_cpu=="arm64" \ |
| 67 # or v8_target_cpu=="s390" or v8_target_cpu=="s390x"', { | 67 # or v8_current_cpu=="s390" or v8_current_cpu=="s390x"', { |
| 68 # # disable fmadd/fmsub so that expected results match generated code in | 68 # # disable fmadd/fmsub so that expected results match generated code in |
| 69 # # RunFloat64MulAndFloat64Add1 and friends. | 69 # # RunFloat64MulAndFloat64Add1 and friends. |
| 70 # 'cflags': ['-ffp-contract=off'], | 70 # 'cflags': ['-ffp-contract=off'], |
| 71 #}], | 71 #}], |
| 72 | 72 |
| 73 # TODO(machenbach): Translate from gyp. | 73 # TODO(machenbach): Translate from gyp. |
| 74 #["OS=="aix"", { | 74 #["OS=="aix"", { |
| 75 # "ldflags": [ "-Wl,-bbigtoc" ], | 75 # "ldflags": [ "-Wl,-bbigtoc" ], |
| 76 #}], | 76 #}], |
| 77 | 77 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 "//build/win:default_exe_manifest", | 158 "//build/win:default_exe_manifest", |
| 159 ] | 159 ] |
| 160 | 160 |
| 161 if (is_component_build) { | 161 if (is_component_build) { |
| 162 # Same as cctest, we need to depend on the underlying static target. | 162 # Same as cctest, we need to depend on the underlying static target. |
| 163 deps += [ "../..:v8_maybe_snapshot" ] | 163 deps += [ "../..:v8_maybe_snapshot" ] |
| 164 } else { | 164 } else { |
| 165 deps += [ "../..:v8" ] | 165 deps += [ "../..:v8" ] |
| 166 } | 166 } |
| 167 } | 167 } |
| OLD | NEW |