Skip to content

Commit

Permalink
GH-765 Disable debug symbols on Linux/Android builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Aug 18, 2024
1 parent 542ce01 commit 3312036
Showing 1 changed file with 34 additions and 31 deletions.
65 changes: 34 additions & 31 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,36 +102,36 @@ INCLUDE(GodotCompilerWarnings)
# Setup compiler options for GDExtension Library based on the compiler used
TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PUBLIC
$<${compiler_is_msvc}:
/EHsc
/utf-8
/Zc:preprocessor
/wd5054 # operator '|' deprecated between enumerations of different types
$<$<CONFIG:Debug>:
/MDd
>
$<$<CONFIG:Release>:
/MD
/O2
>
/EHsc
/utf-8
/Zc:preprocessor
/wd5054 # operator '|' deprecated between enumerations of different types
$<$<CONFIG:Debug>:
/MDd
>
$<$<CONFIG:Release>:
/MD
/O2
>
>
$<$<NOT:${compiler_is_msvc}>:
-g
-Wno-unused-value
$<${compiler_is_gnu}:
-Wno-attributes
-Wno-attributes=r1::
>
$<${compiler_is_clang}:
-Wno-ignored-attributes
-Wno-unknown-attributes
>
$<$<CONFIG:Debug>:
-fno-omit-frame-pointer
-O0
>
$<$<CONFIG:Release>:
-O3
>
-Wno-unused-value
$<${compiler_is_gnu}:
-Wno-attributes
-Wno-attributes=r1::
>
$<${compiler_is_clang}:
-Wno-ignored-attributes
-Wno-unknown-attributes
>
$<$<CONFIG:Debug>:
-g
-fno-omit-frame-pointer
-O0
>
$<$<CONFIG:Release>:
-O3
>
>
)

Expand All @@ -151,9 +151,12 @@ IF (NOT APPLE)
# Linker options for the GDExtension library
TARGET_LINK_OPTIONS(${PROJECT_NAME} PRIVATE
$<$<NOT:${compiler_is_msvc}>:
-static-libgcc
-static-libstdc++
-Wl,-R,'$$ORIGIN'
-static-libgcc
-static-libstdc++
-Wl,-R,'$$ORIGIN'
$<$<CONFIG:Release>:
$<$<PLATFORM_ID:Android>:-s>
>
>
)
ENDIF ()
Expand Down

0 comments on commit 3312036

Please sign in to comment.