From 26cd3eb241017a6bf1c3ac981a10fb77d4825b30 Mon Sep 17 00:00:00 2001 From: Rylie Pavlik Date: Fri, 8 Nov 2024 17:18:54 -0600 Subject: [PATCH] Fix CTS running on Android Needed to add the ANativeActivity_onCreate function to the map file for the test library. Bug fix approved by chair for publication from internal repo prior to next regular repo update. Tested-by: Reality Merger Part-of: --- changes/conformance/mr.3596.gl.md | 1 + src/conformance/conformance_test/CMakeLists.txt | 11 +++++++++++ .../conformance_test_android.map | 16 ++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 changes/conformance/mr.3596.gl.md create mode 100644 src/conformance/conformance_test/conformance_test_android.map diff --git a/changes/conformance/mr.3596.gl.md b/changes/conformance/mr.3596.gl.md new file mode 100644 index 00000000..8a23ccad --- /dev/null +++ b/changes/conformance/mr.3596.gl.md @@ -0,0 +1 @@ +Fix: Broken Android builds - not runnable due to undefined symbol. diff --git a/src/conformance/conformance_test/CMakeLists.txt b/src/conformance/conformance_test/CMakeLists.txt index 593672dc..adeb4a89 100644 --- a/src/conformance/conformance_test/CMakeLists.txt +++ b/src/conformance/conformance_test/CMakeLists.txt @@ -177,6 +177,17 @@ elseif(APPLE) conformance_test PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/conformance_test.expsym" ) +elseif(ANDROID) + set_target_properties( + conformance_test + PROPERTIES + LINK_FLAGS + "-Wl,--version-script=\"${CMAKE_CURRENT_SOURCE_DIR}/conformance_test_android.map\"" + ) + target_sources( + conformance_test + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/conformance_test_android.map" + ) else() set_target_properties( conformance_test diff --git a/src/conformance/conformance_test/conformance_test_android.map b/src/conformance/conformance_test/conformance_test_android.map new file mode 100644 index 00000000..a36c081e --- /dev/null +++ b/src/conformance/conformance_test/conformance_test_android.map @@ -0,0 +1,16 @@ +/* +Copyright (c) 2019-2024, The Khronos Group Inc. + +SPDX-License-Identifier: Apache-2.0 +*/ + +{ + global: + testLayer_xrNegotiateLoaderApiLayerInterface; + xrcCleanup; + xrcEnumerateTestCases; + xrcRunConformanceTests; + ANativeActivity_onCreate; + local: + *; +};