Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libc/src/__support/threads/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ add_object_library(
libc.src.__support.error_or
libc.src.__support.threads.thread_common
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
-fno-omit-frame-pointer # This allows us to sniff out the thread args from
# the new thread's stack reliably.
-Wno-frame-address # Yes, calling __builtin_return_address with a
Expand Down
20 changes: 10 additions & 10 deletions libc/src/complex/generic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ add_entrypoint_object(
HDRS
../creal.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand All @@ -18,7 +18,7 @@ add_entrypoint_object(
HDRS
../crealf.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand All @@ -31,7 +31,7 @@ add_entrypoint_object(
HDRS
../creall.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand All @@ -44,7 +44,7 @@ add_entrypoint_object(
HDRS
../crealf16.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand All @@ -59,7 +59,7 @@ add_entrypoint_object(
HDRS
../crealf128.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand All @@ -74,7 +74,7 @@ add_entrypoint_object(
HDRS
../cimag.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand All @@ -87,7 +87,7 @@ add_entrypoint_object(
HDRS
../cimagf.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand All @@ -100,7 +100,7 @@ add_entrypoint_object(
HDRS
../cimagl.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand All @@ -113,7 +113,7 @@ add_entrypoint_object(
HDRS
../cimagf16.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand All @@ -128,7 +128,7 @@ add_entrypoint_object(
HDRS
../cimagf128.h
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.CPP.bit
libc.src.__support.complex_type
Expand Down
2 changes: 1 addition & 1 deletion libc/src/pthread/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ add_entrypoint_object(
libc.src.pthread.pthread_attr_getstack
libc.src.errno.errno
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
-fno-omit-frame-pointer
)

Expand Down
4 changes: 2 additions & 2 deletions libc/src/setjmp/riscv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ add_entrypoint_object(
DEPENDS
libc.hdr.types.jmp_buf
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
-fomit-frame-pointer
)

Expand All @@ -20,6 +20,6 @@ add_entrypoint_object(
DEPENDS
libc.hdr.types.jmp_buf
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
-fomit-frame-pointer
)
4 changes: 2 additions & 2 deletions libc/src/setjmp/x86_64/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ add_entrypoint_object(
DEPENDS
libc.hdr.types.jmp_buf
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
)

add_entrypoint_object(
Expand All @@ -19,6 +19,6 @@ add_entrypoint_object(
DEPENDS
libc.hdr.types.jmp_buf
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
-fomit-frame-pointer
)
2 changes: 1 addition & 1 deletion libc/src/signal/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ add_object_library(
__restore.cpp
COMPILE_OPTIONS
-fomit-frame-pointer
-O3
${libc_opt_high_flag}
-Wframe-larger-than=0
-Wno-attributes
# asan creates asan.module_ctor which uses stack space, causing warnings.
Expand Down
14 changes: 7 additions & 7 deletions libc/src/stdfix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ foreach(suffix IN ITEMS hr r lr hk k lk)
SRCS
abs${suffix}.cpp
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.fixed_point.fx_bits
)
Expand All @@ -24,7 +24,7 @@ foreach(suffix IN ITEMS uhr ur ulr uhk uk)
SRCS
sqrt${suffix}.cpp
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.fixed_point.sqrt
)
Expand All @@ -38,7 +38,7 @@ foreach(suffix IN ITEMS hr r lr hk k lk uhr ur ulr uhk uk ulk)
SRCS
round${suffix}.cpp
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.fixed_point.fx_bits
)
Expand All @@ -62,7 +62,7 @@ add_entrypoint_object(
SRCS
uhksqrtus.cpp
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.fixed_point.sqrt
)
Expand All @@ -74,7 +74,7 @@ add_entrypoint_object(
SRCS
uksqrtui.cpp
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.fixed_point.sqrt
)
Expand All @@ -86,7 +86,7 @@ add_entrypoint_object(
SRCS
exphk.cpp
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.fixed_point.fx_rep
libc.src.__support.CPP.bit
Expand All @@ -99,7 +99,7 @@ add_entrypoint_object(
SRCS
expk.cpp
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
DEPENDS
libc.src.__support.fixed_point.fx_rep
libc.src.__support.CPP.bit
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ function(add_implementation name impl_name)
SRCS ${ADD_IMPL_SRCS}
HDRS ${ADD_IMPL_HDRS}
DEPENDS ${ADD_IMPL_DEPENDS}
COMPILE_OPTIONS -O3 ${ADD_IMPL_COMPILE_OPTIONS}
COMPILE_OPTIONS ${libc_opt_high_flag} ${ADD_IMPL_COMPILE_OPTIONS}
)
get_fq_target_name(${impl_name} fq_target_name)
set_target_properties(${fq_target_name} PROPERTIES REQUIRE_CPU_FEATURES "${ADD_IMPL_REQUIRE}")
Expand Down
2 changes: 1 addition & 1 deletion libc/src/threads/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ add_entrypoint_object(
libc.include.threads
libc.src.errno.errno
COMPILE_OPTIONS
-O3
${libc_opt_high_flag}
-fno-omit-frame-pointer # This allows us to sniff out the thread args from
# the new thread's stack reliably.
)
Expand Down
3 changes: 2 additions & 1 deletion libc/test/src/math/smoke/LdExpTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class LdExpTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {

if constexpr (sizeof(U) < sizeof(long) || sizeof(long) == sizeof(int))
return;
long long_exp_array[4] = {LONG_MIN, INT_MIN - 1L, INT_MAX + 1L, LONG_MAX};
long long_exp_array[4] = {LONG_MIN, static_cast<long>(INT_MIN - 1LL),
static_cast<long>(INT_MAX + 1LL), LONG_MAX};
for (long exp : long_exp_array) {
ASSERT_FP_EQ(zero, func(zero, exp));
ASSERT_FP_EQ(neg_zero, func(neg_zero, exp));
Expand Down