File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ default = ["std"]
19
19
std = []
20
20
21
21
[profile .release ]
22
- opt-level = 3 # Corresponds to -O3
22
+ opt-level = 2 # Corresponds to -O2
23
23
lto = true # Enables Link Time Optimization for further optimizations
24
24
codegen-units = 1 # May increase compilation time but optimizes further
25
25
rpath = false # On some systems, setting this to false can help with optimizations
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ fn main() -> Result<(), cc::Error> {
6
6
. file ( "c/lib.cpp" )
7
7
. include ( "include" )
8
8
. define ( "FU_ENABLE_NUMA" , "0" )
9
- . opt_level ( 3 ) // Set optimization level to 2
9
+ . opt_level ( 2 ) // Optimize compiled C++ to -O2
10
10
. warnings ( false ) ;
11
11
12
12
// Platform-specific C++ standard flags
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function (set_target_properties_for_fork_union_script target_name)
11
11
# In release mode, enable optimizations
12
12
if (CMAKE_BUILD_TYPE STREQUAL "Release" )
13
13
message (STATUS "Enabling optimizations for ${target_name} " )
14
- target_compile_options (${target_name} PRIVATE -O3 )
14
+ target_compile_options (${target_name} PRIVATE -O2 )
15
15
endif ()
16
16
17
17
# if we're not in Release mode
You can’t perform that action at this time.
0 commit comments