Blaze (Bazel) requires linker dependencies to have a .ld, .lds, or
.ldscript extension. Note that version scripts are just the contents of
the VERSION command in (true) linker scripts. However, the gold linker
used by Android does not support implicit linker scripts (which amend
the default linker script), nor the INSERT command. Therefore these
linker scripts are still actually just version scripts.
https://sourceware.org/binutils/docs/ld/VERSION.html
Bug b/
67482470
Change-Id: I3bbe25dab6d916376bdc41bb723279ed2ef62fb0
Reviewed-on: https://swiftshader-review.googlesource.com/13108
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
# hides all the others. Gc sections is used in combination
# with each functions being in its section, to reduce the
# binary size.
- set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "${LINKFLAGS} -Wl,--hash-style=both,--version-script=${DIR}/exports.map,--gc-sections,--no-undefined")
+ set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "${LINKFLAGS} -Wl,--hash-style=both,--version-script=${DIR}/${TARGET}.lds,--gc-sections,--no-undefined")
+ set_target_properties(${TARGET} PROPERTIES LINK_DEPENDS "${DIR}/${TARGET}.lds")
endif()
endmacro()
\r
The GLSL compiler is implemented in [src/OpenGL/compiler/](../src/OpenGL/compiler/). It uses [Flex](http://flex.sourceforge.net/) and [Bison](https://www.gnu.org/software/bison/) to tokenize and parse GLSL shader source. It produces an [abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST), which is then traversed to output assembly-level instructions in [OutputASM.cpp](../src/OpenGL/compiler/OutputASM.cpp).\r
\r
-The [EGL](https://www.khronos.org/registry/egl/specs/eglspec.1.4.20110406.pdf) API is implemented in [src/OpenGL/libEGL/](../src/OpenGL/libEGL/). Its entry functions are listed in [libEGL.def](../src/OpenGL/libEGL/libEGL.def) (for Windows) and [exports.map](../src/OpenGL/libEGL/exports.map) (for Linux), and defined in [main.cpp](../src/OpenGL/libEGL/main.cpp) and implemented in [libEGL.cpp](../src/OpenGL/libEGL/libEGL.cpp). The [Display](../src/OpenGL/libEGL/Display.h), [Surface](../src/OpenGL/libEGL/Surface.h), and [Config](../src/OpenGL/libEGL/Config.h) classes are respective implementations of the abstract EGLDisplay, EGLSurface, and EGLConfig types.\r
+The [EGL](https://www.khronos.org/registry/egl/specs/eglspec.1.4.20110406.pdf) API is implemented in [src/OpenGL/libEGL/](../src/OpenGL/libEGL/). Its entry functions are listed in [libEGL.def](../src/OpenGL/libEGL/libEGL.def) (for Windows) and [libEGL.lds](../src/OpenGL/libEGL/libEGL.lds) (for Linux), and defined in [main.cpp](../src/OpenGL/libEGL/main.cpp) and implemented in [libEGL.cpp](../src/OpenGL/libEGL/libEGL.cpp). The [Display](../src/OpenGL/libEGL/Display.h), [Surface](../src/OpenGL/libEGL/Surface.h), and [Config](../src/OpenGL/libEGL/Config.h) classes are respective implementations of the abstract EGLDisplay, EGLSurface, and EGLConfig types.\r
\r
[OpenGL ES 1.1](https://www.khronos.org/registry/gles/specs/1.1/es_full_spec_1.1.12.pdf) is implemented in [src/OpenGL/libGLES_CM/](../src/OpenGL/libGLES_CM/), while [OpenGL ES 2.0](https://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf) is implemented in [src/OpenGL/libGLESv2/](../src/OpenGL/libGLESv2/). Note that while [OpenGL ES 3.0](https://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.0.pdf) functions are implemented in [libGLESv3.cpp](../src/OpenGL/libGLESv2/libGLESv3.cpp), it is compiled into the libGLESv2 library as standard among most implementations (some platforms have a libGLESv3 symbolically link to libGLESv2). We'll focus on OpenGL ES 2.0 in this documentation.\r
\r
endif
COMMON_LDFLAGS := \
- -Wl,--version-script=$(LOCAL_PATH)/exports.map \
+ -Wl,--version-script=$(LOCAL_PATH)/libEGL.lds \
+ -Wl,--gc-sections \
-Wl,--hash-style=sysv
include $(CLEAR_VARS)
} else if (is_linux) {
sources += [ "../../Main/libX11.cpp" ]
ldflags =
- [ "-Wl,--version-script=" + rebase_path("exports.map", root_build_dir) ]
+ [ "-Wl,--version-script=" + rebase_path("libEGL.lds", root_build_dir) ]
}
configs = [ ":swiftshader_libEGL_private_config" ]
local:
*;
-};
+};
\ No newline at end of file
endif
COMMON_LDFLAGS := \
+ -Wl,--version-script=$(LOCAL_PATH)/libGLES_CM.lds \
-Wl,--gc-sections \
- -Wl,--version-script=$(LOCAL_PATH)/exports.map \
-Wl,--hash-style=sysv
include $(CLEAR_VARS)
endif
COMMON_LDFLAGS := \
+ -Wl,--version-script=$(LOCAL_PATH)/libGLESv2.lds \
-Wl,--gc-sections \
- -Wl,--version-script=$(LOCAL_PATH)/exports.map \
-Wl,--hash-style=sysv
include $(CLEAR_VARS)
ldflags = [ "-Wl,-install_name,@rpath/libswiftshader_libGLESv2.dylib" ]
} else if (is_linux) {
ldflags =
- [ "-Wl,--version-script=" + rebase_path("exports.map", root_build_dir) ]
+ [ "-Wl,--version-script=" + rebase_path("libGLESv2.lds", root_build_dir) ]
}
configs = [ ":swiftshader_libGLESv2_private_config" ]
local:
*;
-};
+};
\ No newline at end of file