aboutsummaryrefslogtreecommitdiff
path: root/libc/cmake/modules
diff options
context:
space:
mode:
authorlntue <35648136+lntue@users.noreply.github.com>2024-02-14 17:12:51 -0500
committerGitHub <noreply@github.com>2024-02-14 17:12:51 -0500
commit271e07321bd0673f5472055012b4cfd1671be9ec (patch)
treee8c400f097961c86dc21a9e2ac2a347e7fe7447e /libc/cmake/modules
parentad49657a424db5e5979236ef5a474e93d827ab2c (diff)
downloadllvm-271e07321bd0673f5472055012b4cfd1671be9ec.zip
llvm-271e07321bd0673f5472055012b4cfd1671be9ec.tar.gz
llvm-271e07321bd0673f5472055012b4cfd1671be9ec.tar.bz2
[libc] Fix fixed point detection and add compile option. (#81788)
Diffstat (limited to 'libc/cmake/modules')
-rw-r--r--libc/cmake/modules/LLVMLibCObjectRules.cmake4
-rw-r--r--libc/cmake/modules/compiler_features/check_fixed_point.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index ef1f248..54c7e1e 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -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")
diff --git a/libc/cmake/modules/compiler_features/check_fixed_point.cpp b/libc/cmake/modules/compiler_features/check_fixed_point.cpp
index 02932dbf..a519269 100644
--- a/libc/cmake/modules/compiler_features/check_fixed_point.cpp
+++ b/libc/cmake/modules/compiler_features/check_fixed_point.cpp
@@ -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