We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9f5659 commit aaeee40Copy full SHA for aaeee40
1 file changed
cmake/deps/customlabels.cmake
@@ -5,12 +5,27 @@ FetchContent_Declare(customlabels
5
GIT_TAG elsa/add-process-storage
6
)
7
8
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
9
+ set(TLS_DIALECT desc)
10
+elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
11
+ set(TLS_DIALECT gnu2)
12
+else()
13
+ message(FATAL_ERROR "Only aarch64 and x86-64 are supported (found: ${CMAKE_SYSTEM_PROCESSOR})")
14
+endif()
15
+
16
FetchContent_MakeAvailable(customlabels)
17
18
add_library(customlabels SHARED
19
${customlabels_SOURCE_DIR}/src/customlabels.c
20
21
22
+target_compile_options(customlabels PRIVATE
23
+ -g
24
+ -fPIC
25
+ -ftls-model=global-dynamic
26
+ -mtls-dialect=${TLS_DIALECT}
27
+)
28
29
target_include_directories(customlabels
30
PUBLIC
31
${customlabels_SOURCE_DIR}/src
0 commit comments