Skip to content

Commit 5e2bde2

Browse files
committed
cmake: add --build-id=sha1 equivalent for gcc
1 parent 85f2748 commit 5e2bde2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ target_include_directories(flutterpi_module PUBLIC
149149
)
150150

151151
target_compile_options(flutterpi_module PUBLIC
152-
--build-id=sha1
153152
$<$<CONFIG:Debug>:-O0 -Wall -Wextra -Wno-sign-compare -Werror -ggdb -U_FORTIFY_SOURCE -DDEBUG>
154153
$<$<CONFIG:RelWithDebInfo>:-O3 -Wall -Wextra -Wno-sign-compare -ggdb -DNDEBUG>
155154
$<$<CONFIG:Release>:-O3 -Wall -Wextra -Wno-sign-compare -DNDEBUG>
@@ -160,6 +159,9 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
160159
if (CMAKE_C_COMPILER_VERSION VERSION_LESS "11.3")
161160
target_compile_options(flutterpi_module PUBLIC -Wno-missing-field-initializers)
162161
endif()
162+
target_link_options(flutter-pi PUBLIC LINKER:--build-id)
163+
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
164+
target_link_options(flutter-pi PUBLIC LINKER:--build-id=sha1)
163165
endif()
164166

165167
# libinput stuff

0 commit comments

Comments
 (0)