Skip to content

Commit

Permalink
Enable LTO for libcrt
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterymath committed Jan 3, 2024
1 parent 8d79915 commit 56cd8e1
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions mos-platform/common/crt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ add_platform_library(common-crt
rotate.cc
)

# Disable LTO for builtins since they may otherwise take up ZP and static
# spance even if unused. Disable static stacks, since they are not LTOed, and
# they may be called within interrupts.
target_compile_options(common-crt PRIVATE -fno-lto -fno-static-stack)

# Merge the builtins library from llvm-mos into libcrt.
get_filename_component(compiler_dir ${CMAKE_C_COMPILER} DIRECTORY)
find_library(builtins clang_rt.builtins REQUIRED PATHS ${compiler_dir}/../lib/clang/18/lib/mos-unknown-unknown NO_DEFAULT_PATH)
Expand Down

0 comments on commit 56cd8e1

Please sign in to comment.