MacOS: Use exported_symbols_list to filter exported symbols for .gn build files
GN follow up to the corresponding CMake change:
https://swiftshader-review.googlesource.com/c/SwiftShader/+/32568
Bug b/134929443
Change-Id: Ic1eabafaef8e2eda92199434359456c1ba10e875
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34110
Tested-by: Alexis Hétu <sugoi@google.com>
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/OpenGL/libEGL/BUILD.gn b/src/OpenGL/libEGL/BUILD.gn
index 993ca6a..a17a3a7 100644
--- a/src/OpenGL/libEGL/BUILD.gn
+++ b/src/OpenGL/libEGL/BUILD.gn
@@ -73,7 +73,11 @@
"CoreFoundation.framework",
"IOSurface.framework",
]
- ldflags = [ "-Wl,-install_name,@rpath/libswiftshader_libEGL.dylib" ]
+ ldflags = [
+ "-Wl,-install_name,@rpath/libswiftshader_libEGL.dylib",
+ "-Wl,-exported_symbols_list," +
+ rebase_path("libEGL.exports", root_build_dir),
+ ]
} else if (is_linux) {
if (use_x11) {
sources += [ "../../Main/libX11.cpp" ]