Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: build/config/gcc/BUILD.gn

Issue 1930773002: Always set symbol visibility when compiling with GCC / Clang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/allocator/BUILD.gn ('k') | build/secondary/third_party/nss/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/gcc/BUILD.gn
diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn
index 2c1c61f6afd10d7ad439155642da1576cd47fd5e..17414467e76ee9a906d7e9bf4d1789933c9128c7 100644
--- a/build/config/gcc/BUILD.gn
+++ b/build/config/gcc/BUILD.gn
@@ -21,6 +21,13 @@ config("symbol_visibility_hidden") {
cflags = [ "-fvisibility=hidden" ]
}
+# This config is usually set when :symbol_visibility_hidden is removed.
+# It's often a good idea to set visibility explicitly, as there're flags
+# which would error out otherwise (e.g. -fsanitize=cfi-unrelated-cast)
+config("symbol_visibility_default") {
+ cflags = [ "-fvisibility=default" ]
+}
+
# The rpath is the dynamic library search path. Setting this config on a link
# step will put the directory where the build generates shared libraries into
# the rpath.
« no previous file with comments | « base/allocator/BUILD.gn ('k') | build/secondary/third_party/nss/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698