Turn on flags to enforce SK_API.
These flags hide symbols that are not marked with SK_API when linked into a shared library. There's nominally no effect on static linking, but I'm pretty sure the Mac linker takes some advantage of this too to run faster. This makes component-build DM no longer link: it uses many non SK_API APIs. Fiddle in contrast is just fine with our public APIs, so no need to restrict that. It'll be fun finding out which of our other tools go which ways. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180383003 Review-Url: https://codereview.chromium.org/2180383003
This commit is contained in:
parent
4b1e17edc7
commit
8796ff1fbc
40
BUILD.gn
40
BUILD.gn
@ -400,24 +400,26 @@ test_lib("gm") {
|
||||
]
|
||||
}
|
||||
|
||||
executable("dm") {
|
||||
sources = [
|
||||
"dm/DM.cpp",
|
||||
"dm/DMJsonWriter.cpp",
|
||||
"dm/DMSrcSink.cpp",
|
||||
if (!is_component_build) { # DM uses many non-SK_API APIs...
|
||||
executable("dm") {
|
||||
sources = [
|
||||
"dm/DM.cpp",
|
||||
"dm/DMJsonWriter.cpp",
|
||||
"dm/DMSrcSink.cpp",
|
||||
|
||||
# TODO: tests for real
|
||||
"tests/Test.cpp",
|
||||
]
|
||||
include_dirs = [ "tests" ]
|
||||
deps = [
|
||||
":flags",
|
||||
":gm",
|
||||
":gpu_tool_utils",
|
||||
":skia",
|
||||
":tool_utils",
|
||||
"//third_party/jsoncpp",
|
||||
"//third_party/libpng",
|
||||
]
|
||||
testonly = true
|
||||
# TODO: tests for real
|
||||
"tests/Test.cpp",
|
||||
]
|
||||
include_dirs = [ "tests" ]
|
||||
deps = [
|
||||
":flags",
|
||||
":gm",
|
||||
":gpu_tool_utils",
|
||||
":skia",
|
||||
":tool_utils",
|
||||
"//third_party/jsoncpp",
|
||||
"//third_party/libpng",
|
||||
]
|
||||
testonly = true
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ config("default") {
|
||||
"-g",
|
||||
"-fstrict-aliasing",
|
||||
"-fPIC",
|
||||
"-fvisibility=hidden",
|
||||
|
||||
"-Werror",
|
||||
"-Wall",
|
||||
@ -31,6 +32,7 @@ config("default") {
|
||||
"-fno-exceptions",
|
||||
"-fno-rtti",
|
||||
"-fno-threadsafe-statics",
|
||||
"-fvisibility-inlines-hidden",
|
||||
|
||||
"-Wnon-virtual-dtor",
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user