Commit ec63fbe9 by Alexis Hetu Committed by Alexis Hétu

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/+/34110Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 3af883cd
...@@ -73,7 +73,11 @@ swiftshader_shared_library("swiftshader_libEGL") { ...@@ -73,7 +73,11 @@ swiftshader_shared_library("swiftshader_libEGL") {
"CoreFoundation.framework", "CoreFoundation.framework",
"IOSurface.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) { } else if (is_linux) {
if (use_x11) { if (use_x11) {
sources += [ "../../Main/libX11.cpp" ] sources += [ "../../Main/libX11.cpp" ]
......
...@@ -125,7 +125,11 @@ swiftshader_shared_library("swiftshader_libGLESv2") { ...@@ -125,7 +125,11 @@ swiftshader_shared_library("swiftshader_libGLESv2") {
] ]
if (is_mac) { if (is_mac) {
ldflags = [ "-Wl,-install_name,@rpath/libswiftshader_libGLESv2.dylib" ] ldflags = [
"-Wl,-install_name,@rpath/libswiftshader_libGLESv2.dylib",
"-Wl,-exported_symbols_list," +
rebase_path("libGLESv2.exports", root_build_dir),
]
} else if (is_linux) { } else if (is_linux) {
inputs = [ inputs = [
"libGLESv2.lds", "libGLESv2.lds",
......
...@@ -108,7 +108,13 @@ swiftshader_shared_library("swiftshader_libvulkan") { ...@@ -108,7 +108,13 @@ swiftshader_shared_library("swiftshader_libvulkan") {
output_name = "libvulkan" output_name = "libvulkan"
output_dir = "$root_out_dir/swiftshader" output_dir = "$root_out_dir/swiftshader"
if (is_linux) { if (is_mac) {
ldflags = [
"-Wl,-install_name,@rpath/libvk_swiftshader.dylib",
"-Wl,-exported_symbols_list," +
rebase_path("libvk_swiftshader.exports", root_build_dir),
]
} else if (is_linux) {
inputs = [ inputs = [
"libvk_swiftshader.lds", "libvk_swiftshader.lds",
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment