Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ec63fbe

Browse files
committed
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 <[email protected]> Presubmit-Ready: Alexis Hétu <[email protected]> Kokoro-Presubmit: kokoro <[email protected]> Reviewed-by: Ben Clayton <[email protected]> Reviewed-by: Nicolas Capens <[email protected]>
1 parent 3af883c commit ec63fbe

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

src/OpenGL/libEGL/BUILD.gn

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ swiftshader_shared_library("swiftshader_libEGL") {
7373
"CoreFoundation.framework",
7474
"IOSurface.framework",
7575
]
76-
ldflags = [ "-Wl,-install_name,@rpath/libswiftshader_libEGL.dylib" ]
76+
ldflags = [
77+
"-Wl,-install_name,@rpath/libswiftshader_libEGL.dylib",
78+
"-Wl,-exported_symbols_list," +
79+
rebase_path("libEGL.exports", root_build_dir),
80+
]
7781
} else if (is_linux) {
7882
if (use_x11) {
7983
sources += [ "../../Main/libX11.cpp" ]

src/OpenGL/libGLESv2/BUILD.gn

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ swiftshader_shared_library("swiftshader_libGLESv2") {
125125
]
126126

127127
if (is_mac) {
128-
ldflags = [ "-Wl,-install_name,@rpath/libswiftshader_libGLESv2.dylib" ]
128+
ldflags = [
129+
"-Wl,-install_name,@rpath/libswiftshader_libGLESv2.dylib",
130+
"-Wl,-exported_symbols_list," +
131+
rebase_path("libGLESv2.exports", root_build_dir),
132+
]
129133
} else if (is_linux) {
130134
inputs = [
131135
"libGLESv2.lds",

src/Vulkan/BUILD.gn

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,13 @@ swiftshader_shared_library("swiftshader_libvulkan") {
108108
output_name = "libvulkan"
109109
output_dir = "$root_out_dir/swiftshader"
110110

111-
if (is_linux) {
111+
if (is_mac) {
112+
ldflags = [
113+
"-Wl,-install_name,@rpath/libvk_swiftshader.dylib",
114+
"-Wl,-exported_symbols_list," +
115+
rebase_path("libvk_swiftshader.exports", root_build_dir),
116+
]
117+
} else if (is_linux) {
112118
inputs = [
113119
"libvk_swiftshader.lds",
114120
]

0 commit comments

Comments
 (0)