Fix import/export annotations for v8 targets that are always static
Instead of suppressing the linker warnings and disallowing incremental linking, just fix the annotations.. R=machenbach@chromium.org,jgruber@chromium.org BUG= Review-Url: https://codereview.chromium.org/2420603002 Cr-Commit-Position: refs/heads/master@{#40260}
This commit is contained in:
parent
41f51fe3ef
commit
29ddd7ff82
11
BUILD.gn
11
BUILD.gn
@ -2405,6 +2405,10 @@ v8_source_set("fuzzer_support_nocomponent") {
|
|||||||
":v8_maybe_snapshot",
|
":v8_maybe_snapshot",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if (is_component_build) {
|
||||||
|
defines = [ "BUILDING_V8_SHARED" ]
|
||||||
|
}
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
":v8_libbase",
|
":v8_libbase",
|
||||||
":v8_libplatform",
|
":v8_libplatform",
|
||||||
@ -2653,10 +2657,13 @@ v8_executable("v8_parser_shell") {
|
|||||||
"//build/win:default_exe_manifest",
|
"//build/win:default_exe_manifest",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
defines = []
|
||||||
|
|
||||||
if (is_component_build) {
|
if (is_component_build) {
|
||||||
# v8_parser_shell can't be built against a shared library, so we
|
# v8_parser_shell can't be built against a shared library, so we
|
||||||
# need to depend on the underlying static target in that case.
|
# need to depend on the underlying static target in that case.
|
||||||
deps += [ ":v8_maybe_snapshot" ]
|
deps += [ ":v8_maybe_snapshot" ]
|
||||||
|
defines += [ "BUILDING_V8_SHARED" ]
|
||||||
} else {
|
} else {
|
||||||
deps += [ ":v8" ]
|
deps += [ ":v8" ]
|
||||||
}
|
}
|
||||||
@ -2744,6 +2751,10 @@ v8_source_set("parser_fuzzer") {
|
|||||||
":fuzzer_support_nocomponent",
|
":fuzzer_support_nocomponent",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if (is_component_build) {
|
||||||
|
defines = [ "BUILDING_V8_SHARED" ]
|
||||||
|
}
|
||||||
|
|
||||||
configs = [
|
configs = [
|
||||||
":external_config",
|
":external_config",
|
||||||
":internal_config_base",
|
":internal_config_base",
|
||||||
|
@ -35,11 +35,6 @@
|
|||||||
// the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8
|
// the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8
|
||||||
// static library or building a program which uses the V8 static library neither
|
// static library or building a program which uses the V8 static library neither
|
||||||
// BUILDING_V8_SHARED nor USING_V8_SHARED should be defined.
|
// BUILDING_V8_SHARED nor USING_V8_SHARED should be defined.
|
||||||
#if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
|
|
||||||
#error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\
|
|
||||||
build configuration to ensure that at most one of these is set
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef BUILDING_V8_SHARED
|
#ifdef BUILDING_V8_SHARED
|
||||||
# define V8_EXPORT __declspec(dllexport)
|
# define V8_EXPORT __declspec(dllexport)
|
||||||
#elif USING_V8_SHARED
|
#elif USING_V8_SHARED
|
||||||
|
@ -317,11 +317,6 @@ v8_executable("cctest") {
|
|||||||
"../..:internal_config_base",
|
"../..:internal_config_base",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
|
||||||
remove_configs = [ "//build/config/win:default_incremental_linking" ]
|
|
||||||
configs += [ "//build/config/win:no_incremental_linking" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# TODO(machenbach): Translate from gyp.
|
# TODO(machenbach): Translate from gyp.
|
||||||
#["OS=="aix"", {
|
#["OS=="aix"", {
|
||||||
# "ldflags": [ "-Wl,-bbigtoc" ],
|
# "ldflags": [ "-Wl,-bbigtoc" ],
|
||||||
@ -337,10 +332,13 @@ v8_executable("cctest") {
|
|||||||
"//build/win:default_exe_manifest",
|
"//build/win:default_exe_manifest",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
defines = []
|
||||||
|
|
||||||
if (is_component_build) {
|
if (is_component_build) {
|
||||||
# cctest can't be built against a shared library, so we
|
# cctest can't be built against a shared library, so we
|
||||||
# need to depend on the underlying static target in that case.
|
# need to depend on the underlying static target in that case.
|
||||||
deps += [ "../..:v8_maybe_snapshot" ]
|
deps += [ "../..:v8_maybe_snapshot" ]
|
||||||
|
defines += [ "BUILDING_V8_SHARED" ]
|
||||||
} else {
|
} else {
|
||||||
deps += [ "../..:v8" ]
|
deps += [ "../..:v8" ]
|
||||||
}
|
}
|
||||||
@ -364,14 +362,6 @@ v8_executable("cctest") {
|
|||||||
|
|
||||||
# MSVS wants this for gay-{precision,shortest}.cc.
|
# MSVS wants this for gay-{precision,shortest}.cc.
|
||||||
cflags += [ "/bigobj" ]
|
cflags += [ "/bigobj" ]
|
||||||
|
|
||||||
# Suppress warnings about importing locally defined symbols.
|
|
||||||
if (is_component_build) {
|
|
||||||
ldflags += [
|
|
||||||
"/ignore:4049",
|
|
||||||
"/ignore:4217",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,20 +417,13 @@ v8_executable("generate-bytecode-expectations") {
|
|||||||
"//build/win:default_exe_manifest",
|
"//build/win:default_exe_manifest",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
defines = []
|
||||||
|
|
||||||
if (is_component_build) {
|
if (is_component_build) {
|
||||||
# Same as cctest, we need to depend on the underlying static target.
|
# Same as cctest, we need to depend on the underlying static target.
|
||||||
deps += [ "../..:v8_maybe_snapshot" ]
|
deps += [ "../..:v8_maybe_snapshot" ]
|
||||||
|
defines += [ "BUILDING_V8_SHARED" ]
|
||||||
} else {
|
} else {
|
||||||
deps += [ "../..:v8" ]
|
deps += [ "../..:v8" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_win) {
|
|
||||||
# Suppress warnings about importing locally defined symbols.
|
|
||||||
if (is_component_build) {
|
|
||||||
ldflags = [
|
|
||||||
"/ignore:4049",
|
|
||||||
"/ignore:4217",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -429,6 +429,7 @@
|
|||||||
# cctest can't be built against a shared library, so we need to
|
# cctest can't be built against a shared library, so we need to
|
||||||
# depend on the underlying static target in that case.
|
# depend on the underlying static target in that case.
|
||||||
'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
|
'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
|
||||||
|
'defines': [ 'BUILDING_V8_SHARED', ]
|
||||||
}, {
|
}, {
|
||||||
'dependencies': ['../../src/v8.gyp:v8'],
|
'dependencies': ['../../src/v8.gyp:v8'],
|
||||||
}],
|
}],
|
||||||
@ -479,6 +480,7 @@
|
|||||||
['component=="shared_library"', {
|
['component=="shared_library"', {
|
||||||
# Same as cctest, we need to depend on the underlying static target.
|
# Same as cctest, we need to depend on the underlying static target.
|
||||||
'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
|
'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
|
||||||
|
'defines': [ 'BUILDING_V8_SHARED', ]
|
||||||
}, {
|
}, {
|
||||||
'dependencies': ['../../src/v8.gyp:v8'],
|
'dependencies': ['../../src/v8.gyp:v8'],
|
||||||
}],
|
}],
|
||||||
|
@ -59,6 +59,11 @@
|
|||||||
'sources': [ ### gcmole(all) ###
|
'sources': [ ### gcmole(all) ###
|
||||||
'parser.cc',
|
'parser.cc',
|
||||||
],
|
],
|
||||||
|
'conditions': [
|
||||||
|
['component=="shared_library"', {
|
||||||
|
'defines': [ 'BUILDING_V8_SHARED', ]
|
||||||
|
}],
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'target_name': 'v8_simple_regexp_fuzzer',
|
'target_name': 'v8_simple_regexp_fuzzer',
|
||||||
@ -416,6 +421,7 @@
|
|||||||
# fuzzers can't be built against a shared library, so we need to
|
# fuzzers can't be built against a shared library, so we need to
|
||||||
# depend on the underlying static target in that case.
|
# depend on the underlying static target in that case.
|
||||||
'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
|
'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
|
||||||
|
'defines': [ 'BUILDING_V8_SHARED', ]
|
||||||
}, {
|
}, {
|
||||||
'dependencies': ['../../src/v8.gyp:v8'],
|
'dependencies': ['../../src/v8.gyp:v8'],
|
||||||
}],
|
}],
|
||||||
|
@ -153,11 +153,6 @@ v8_executable("unittests") {
|
|||||||
"../..:internal_config_base",
|
"../..:internal_config_base",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
|
||||||
remove_configs = [ "//build/config/win:default_incremental_linking" ]
|
|
||||||
configs += [ "//build/config/win:no_incremental_linking" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# TODO(machenbach): Translate from gyp.
|
# TODO(machenbach): Translate from gyp.
|
||||||
#['OS=="aix"', {
|
#['OS=="aix"', {
|
||||||
# 'ldflags': [ '-Wl,-bbigtoc' ],
|
# 'ldflags': [ '-Wl,-bbigtoc' ],
|
||||||
@ -172,10 +167,13 @@ v8_executable("unittests") {
|
|||||||
"//testing/gtest",
|
"//testing/gtest",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
defines = []
|
||||||
|
|
||||||
if (is_component_build) {
|
if (is_component_build) {
|
||||||
# compiler-unittests can't be built against a shared library, so we
|
# compiler-unittests can't be built against a shared library, so we
|
||||||
# need to depend on the underlying static target in that case.
|
# need to depend on the underlying static target in that case.
|
||||||
deps += [ "../..:v8_maybe_snapshot" ]
|
deps += [ "../..:v8_maybe_snapshot" ]
|
||||||
|
defines += [ "BUILDING_V8_SHARED" ]
|
||||||
} else {
|
} else {
|
||||||
deps += [ "../..:v8" ]
|
deps += [ "../..:v8" ]
|
||||||
}
|
}
|
||||||
@ -185,13 +183,5 @@ v8_executable("unittests") {
|
|||||||
# bytecode-utils.h.
|
# bytecode-utils.h.
|
||||||
# C4309: 'static_cast': truncation of constant value
|
# C4309: 'static_cast': truncation of constant value
|
||||||
cflags = [ "/wd4309" ]
|
cflags = [ "/wd4309" ]
|
||||||
|
|
||||||
# Suppress warnings about importing locally defined symbols.
|
|
||||||
if (is_component_build) {
|
|
||||||
ldflags = [
|
|
||||||
"/ignore:4049",
|
|
||||||
"/ignore:4217",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,6 +230,7 @@
|
|||||||
# compiler-unittests can't be built against a shared library, so we
|
# compiler-unittests can't be built against a shared library, so we
|
||||||
# need to depend on the underlying static target in that case.
|
# need to depend on the underlying static target in that case.
|
||||||
'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
|
'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
|
||||||
|
'defines': [ 'BUILDING_V8_SHARED', ]
|
||||||
}, {
|
}, {
|
||||||
'dependencies': ['../../src/v8.gyp:v8'],
|
'dependencies': ['../../src/v8.gyp:v8'],
|
||||||
}],
|
}],
|
||||||
|
Loading…
Reference in New Issue
Block a user