Move visibility=hidden directive.

This CL moves the visibility=hidden directive from the top level applied
flags to libtint specifically. This fixes up an issue between
SPIRV-Tools and the sample app when using std::rfind which ends up with
different visibility.

Change-Id: Ib06949b3755db66027d3656d3d6ce2504bfda81e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29460
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
dan sinclair 2020-10-06 15:11:17 +00:00 committed by Commit Bot service account
parent b5e5b804c3
commit b8d90ead93
2 changed files with 4 additions and 1 deletions

View File

@ -136,7 +136,6 @@ function(tint_default_compile_options TARGET)
-std=c++14
-fno-exceptions
-fno-rtti
-fvisibility=hidden
-Wall
-Werror
-Wextra

View File

@ -376,6 +376,10 @@ set(TINT_TEST_SRCS
## Tint library
add_library(libtint ${TINT_LIB_SRCS})
tint_default_compile_options(libtint)
if (${COMPILER_IS_LIKE_GNU})
target_compile_options(libtint PRIVATE -fvisibility=hidden)
endif()
set_target_properties(libtint PROPERTIES OUTPUT_NAME "tint")
if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER})