Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 # TODO(jochen): These will need to be user-settable to support standalone V8 | 5 # TODO(jochen): These will need to be user-settable to support standalone V8 |
| 6 # builds. | 6 # builds. |
| 7 v8_compress_startup_data = "off" | 7 v8_compress_startup_data = "off" |
| 8 v8_deprecation_warnings = false | 8 v8_deprecation_warnings = false |
| 9 v8_enable_disassembler = false | 9 v8_enable_disassembler = false |
| 10 v8_enable_gdbjit = false | 10 v8_enable_gdbjit = false |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 ############################################################################### | 24 ############################################################################### |
| 25 # Configurations | 25 # Configurations |
| 26 # | 26 # |
| 27 config("internal_config") { | 27 config("internal_config") { |
| 28 visibility = ":*" # Only targets in this file can depend on this. | 28 visibility = ":*" # Only targets in this file can depend on this. |
| 29 | 29 |
| 30 include_dirs = [ "." ] | 30 include_dirs = [ "." ] |
| 31 | 31 |
| 32 if (component_mode == "shared_library") { | 32 if (component_mode == "shared_library") { |
| 33 defines = [ | 33 defines = [ |
| 34 "V8_SHARED", | |
| 34 "BUILDING_V8_SHARED", | 35 "BUILDING_V8_SHARED", |
| 35 "V8_SHARED", | |
| 36 ] | 36 ] |
| 37 } | 37 } |
| 38 } | 38 } |
| 39 | 39 |
| 40 # This config should only be applied to code using V8 and not any V8 code | |
| 41 # itself. | |
| 42 config("external_config") { | |
| 43 if (is_component_build) { | |
| 44 defines = [ | |
| 45 "V8_SHARED", | |
| 46 "USING_V8_SHARED", | |
| 47 ] | |
| 48 } | |
| 49 include_dirs = [ "include" ] | |
| 50 } | |
| 51 | |
| 40 config("features") { | 52 config("features") { |
| 41 visibility = ":*" # Only targets in this file can depend on this. | 53 visibility = ":*" # Only targets in this file can depend on this. |
| 42 | 54 |
| 43 defines = [] | 55 defines = [] |
| 44 | 56 |
| 45 if (v8_enable_disassembler == true) { | 57 if (v8_enable_disassembler == true) { |
| 46 defines += [ | 58 defines += [ |
| 47 "ENABLE_DISASSEMBLER", | 59 "ENABLE_DISASSEMBLER", |
| 48 ] | 60 ] |
| 49 } | 61 } |
| (...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 953 | 965 |
| 954 configs -= [ "//build/config/compiler:chromium_code" ] | 966 configs -= [ "//build/config/compiler:chromium_code" ] |
| 955 configs += [ "//build/config/compiler:no_chromium_code" ] | 967 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 956 configs += [ ":internal_config", ":features", ":toolchain" ] | 968 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 957 } | 969 } |
| 958 | 970 |
| 959 ############################################################################### | 971 ############################################################################### |
| 960 # Executables | 972 # Executables |
| 961 # | 973 # |
| 962 | 974 |
| 975 if (current_toolchain == host_toolchain) { | |
|
Michael Achenbach
2014/06/05 08:24:35
nit: no indentation on that level is normal?
| |
| 976 | |
| 963 executable("mksnapshot") { | 977 executable("mksnapshot") { |
| 964 visibility = ":*" # Only targets in this file can depend on this. | 978 visibility = ":*" # Only targets in this file can depend on this. |
| 965 | 979 |
| 966 sources = [ | 980 sources = [ |
| 967 "src/mksnapshot.cc", | 981 "src/mksnapshot.cc", |
| 968 ] | 982 ] |
| 969 | 983 |
| 970 configs -= [ "//build/config/compiler:chromium_code" ] | 984 configs -= [ "//build/config/compiler:chromium_code" ] |
| 971 configs += [ "//build/config/compiler:no_chromium_code" ] | 985 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 972 configs += [ ":internal_config", ":features", ":toolchain" ] | 986 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 973 | 987 |
| 974 deps = [ | 988 deps = [ |
| 975 ":v8_base", | 989 ":v8_base", |
| 976 ":v8_nosnapshot", | 990 ":v8_nosnapshot", |
| 977 ] | 991 ] |
| 978 | 992 |
| 979 libs = [] | |
| 980 | |
| 981 if (v8_compress_startup_data == "bz2") { | 993 if (v8_compress_startup_data == "bz2") { |
| 982 libs += [ "bz2" ] | 994 libs = [ "bz2" ] |
| 983 } | |
| 984 | |
| 985 if (is_android && current_toolchain != host_toolchain) { | |
| 986 libs += [ "log" ] | |
| 987 } | 995 } |
| 988 } | 996 } |
| 989 | 997 |
| 998 } | |
| 999 | |
| 990 ############################################################################### | 1000 ############################################################################### |
| 991 # Public targets | 1001 # Public targets |
| 992 # | 1002 # |
| 993 | 1003 |
| 994 if (component_mode == "shared_library") { | 1004 if (component_mode == "shared_library") { |
| 995 | 1005 |
| 996 component("v8") { | 1006 component("v8") { |
| 997 sources = [ | 1007 sources = [ |
| 998 "src/v8dll-main.cc", | 1008 "src/v8dll-main.cc", |
| 999 ] | 1009 ] |
| 1000 | 1010 |
| 1001 if (v8_use_snapshot) { | 1011 if (v8_use_snapshot) { |
| 1002 deps = [ | 1012 deps = [ |
| 1003 ":v8_base", | 1013 ":v8_base", |
| 1004 ":v8_snapshot", | 1014 ":v8_snapshot", |
| 1005 ] | 1015 ] |
| 1006 } else { | 1016 } else { |
| 1007 deps = [ | 1017 deps = [ |
| 1008 ":v8_base", | 1018 ":v8_base", |
| 1009 ":v8_nosnapshot", | 1019 ":v8_nosnapshot", |
| 1010 ] | 1020 ] |
| 1011 } | 1021 } |
| 1012 | 1022 |
| 1013 configs -= [ "//build/config/compiler:chromium_code" ] | 1023 configs -= [ "//build/config/compiler:chromium_code" ] |
| 1014 configs += [ "//build/config/compiler:no_chromium_code" ] | 1024 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 1015 configs += [ ":internal_config", ":features", ":toolchain" ] | 1025 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 1016 | 1026 |
| 1017 # TODO(jochen): Support direct dependent configs. | 1027 direct_dependent_configs = [ ":external_config" ] |
| 1028 | |
| 1029 if (is_android && current_toolchain != host_toolchain) { | |
| 1030 libs += [ "log" ] | |
| 1031 } | |
| 1018 } | 1032 } |
| 1019 | 1033 |
| 1020 } else { | 1034 } else { |
| 1021 | 1035 |
| 1022 group("v8") { | 1036 group("v8") { |
| 1023 if (v8_use_snapshot) { | 1037 if (v8_use_snapshot) { |
| 1024 deps = [ | 1038 deps = [ |
| 1025 ":v8_base", | 1039 ":v8_base", |
| 1026 ":v8_snapshot", | 1040 ":v8_snapshot", |
| 1027 ] | 1041 ] |
| 1028 } else { | 1042 } else { |
| 1029 deps = [ | 1043 deps = [ |
| 1030 ":v8_base", | 1044 ":v8_base", |
| 1031 ":v8_nosnapshot", | 1045 ":v8_nosnapshot", |
| 1032 ] | 1046 ] |
| 1033 } | 1047 } |
| 1034 # TODO(jochen): Support direct dependent configs. | 1048 |
| 1049 direct_dependent_configs = [ ":external_config" ] | |
| 1035 } | 1050 } |
| 1036 | 1051 |
| 1037 } | 1052 } |
| OLD | NEW |