diff --git a/Cargo.toml b/Cargo.toml index 5b2cf756..9f4eccd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,6 +36,7 @@ loot-condition-interpreter = "5.3.1" [profile.release] debug = "limited" +lto = "thin" [profile.rel-with-deb-info] inherits = "release" diff --git a/cxx/CMakeLists.txt b/cxx/CMakeLists.txt index 2a55eb68..f3653d58 100644 --- a/cxx/CMakeLists.txt +++ b/cxx/CMakeLists.txt @@ -154,7 +154,6 @@ target_include_directories(loot SYSTEM PRIVATE if(CMAKE_SYSTEM_NAME STREQUAL "Windows") target_compile_definitions(loot PRIVATE UNICODE _UNICODE LOOT_EXPORT) - target_compile_options(loot PRIVATE "/Zc:__cplusplus") set(LOOT_LIBS ntdll ws2_32 bcrypt) @@ -167,7 +166,8 @@ endif() if(MSVC) # Turn off permissive mode to be more standards-compliant and avoid compiler errors. - target_compile_options(loot PRIVATE "/permissive-" "/W4") + target_compile_options(loot PRIVATE "/permissive-" "/W4" "/Zc:__cplusplus" "/GL") + target_link_options(loot PRIVATE "/LTCG") endif() ############################## diff --git a/nodejs/Cargo.toml b/nodejs/Cargo.toml index 07e0ba7b..904239a1 100644 --- a/nodejs/Cargo.toml +++ b/nodejs/Cargo.toml @@ -16,7 +16,3 @@ napi-derive = "2.12.2" [build-dependencies] napi-build = "2.0.1" - -[profile.release] -lto = true -strip = "symbols"