mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 11:16:06 +00:00
[libc] Fix fixed point detection and add compile option. (#81788)
This commit is contained in:
parent
ad49657a42
commit
271e07321b
@ -49,6 +49,10 @@ function(_get_common_compile_options output_var flags)
|
||||
list(APPEND compile_options "-ffreestanding")
|
||||
endif()
|
||||
|
||||
if(LIBC_COMPILER_HAS_FIXED_POINT)
|
||||
list(APPEND compile_options "-ffixed-point")
|
||||
endif()
|
||||
|
||||
list(APPEND compile_options "-fno-builtin")
|
||||
list(APPEND compile_options "-fno-exceptions")
|
||||
list(APPEND compile_options "-fno-lax-vector-conversions")
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "include/llvm-libc-macross/stdfix_macros.h"
|
||||
#include "include/llvm-libc-macros/stdfix-macros.h"
|
||||
|
||||
#ifndef LIBC_COMPILER_HAS_FIXED_POINT
|
||||
#error unsupported
|
||||
|
@ -31,6 +31,9 @@ function(add_unittest_framework_library name)
|
||||
if(TARGET libc.src.time.clock)
|
||||
target_compile_definitions(${lib} PRIVATE TARGET_SUPPORTS_CLOCK)
|
||||
endif()
|
||||
if(LIBC_COMPILER_HAS_FIXED_POINT)
|
||||
target_compile_options(${lib} PUBLIC -ffixed-point)
|
||||
endif()
|
||||
endforeach()
|
||||
target_include_directories(${name}.hermetic PRIVATE ${LIBC_BUILD_DIR}/include)
|
||||
target_compile_options(${name}.hermetic
|
||||
|
Loading…
x
Reference in New Issue
Block a user