mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
libbuitin/compiler-rt: Solve some compilation errors
1. remove_item It needs to use the full path to exclude the file, otherwise the exclusion will fail 2. No include path was added, resulting in the header file not being found Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
5f7d4ddcad
commit
6301af9a44
@@ -78,39 +78,37 @@ if(CONFIG_BUILTIN_COMPILER_RT)
|
||||
|
||||
set(SRCSTMP)
|
||||
set(RT_BUILTINS_SRCS)
|
||||
file(GLOB RT_BUILTINS_SRCS
|
||||
${CMAKE_CURRENT_LIST_DIR}/compiler-rt/lib/builtins/*.c)
|
||||
set(BUILTINS_DIR ${CMAKE_CURRENT_LIST_DIR}/compiler-rt/lib/builtins)
|
||||
|
||||
file(GLOB SRCSTMP
|
||||
${CMAKE_CURRENT_LIST_DIR}/compiler-rt/lib/builtins/${ARCH}/*.S)
|
||||
file(GLOB RT_BUILTINS_SRCS ${BUILTINS_DIR}/*.c)
|
||||
|
||||
file(GLOB SRCSTMP ${BUILTINS_DIR}/${ARCH}/*.S)
|
||||
list(APPEND RT_BUILTINS_SRCS ${SRCSTMP})
|
||||
|
||||
file(GLOB SRCSTMP
|
||||
${CMAKE_CURRENT_LIST_DIR}/compiler-rt/lib/builtins/${ARCH}/*.c)
|
||||
file(GLOB SRCSTMP ${BUILTINS_DIR}/${ARCH}/*.c)
|
||||
list(APPEND RT_BUILTINS_SRCS ${SRCSTMP})
|
||||
|
||||
if(NOT CONFIG_LIB_COMPILER_RT_HAS_BFLOAT16)
|
||||
set(RT_BUILTINS_BFLOAT16_SRCS
|
||||
${CMAKE_CURRENT_LIST_DIR}/compiler-rt/lib/builtins/truncdfbf2.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/compiler-rt/lib/builtins/truncsfbf2.c)
|
||||
set(RT_BUILTINS_BFLOAT16_SRCS ${BUILTINS_DIR}/truncdfbf2.c
|
||||
${BUILTINS_DIR}/truncsfbf2.c)
|
||||
list(REMOVE_ITEM RT_BUILTINS_SRCS ${RT_BUILTINS_BFLOAT16_SRCS})
|
||||
endif()
|
||||
|
||||
set(x86_80_BIT_SOURCES
|
||||
divxc3.c
|
||||
extendxftf2.c
|
||||
fixxfdi.c
|
||||
fixxfti.c
|
||||
fixunsxfdi.c
|
||||
fixunsxfsi.c
|
||||
fixunsxfti.c
|
||||
floatdixf.c
|
||||
floattixf.c
|
||||
floatundixf.c
|
||||
floatuntixf.c
|
||||
mulxc3.c
|
||||
powixf2.c
|
||||
trunctfxf2.c)
|
||||
${BUILTINS_DIR}/divxc3.c
|
||||
${BUILTINS_DIR}/extendxftf2.c
|
||||
${BUILTINS_DIR}/fixxfdi.c
|
||||
${BUILTINS_DIR}/fixxfti.c
|
||||
${BUILTINS_DIR}/fixunsxfdi.c
|
||||
${BUILTINS_DIR}/fixunsxfsi.c
|
||||
${BUILTINS_DIR}/fixunsxfti.c
|
||||
${BUILTINS_DIR}/floatdixf.c
|
||||
${BUILTINS_DIR}/floattixf.c
|
||||
${BUILTINS_DIR}/floatundixf.c
|
||||
${BUILTINS_DIR}/floatuntixf.c
|
||||
${BUILTINS_DIR}/mulxc3.c
|
||||
${BUILTINS_DIR}/powixf2.c
|
||||
${BUILTINS_DIR}/trunctfxf2.c)
|
||||
|
||||
if(NOT CONFIG_ARCH_X86_64)
|
||||
list(REMOVE_ITEM RT_BUILTINS_SRCS ${x86_80_BIT_SOURCES})
|
||||
@@ -153,6 +151,10 @@ if(CONFIG_COVERAGE_COMPILER_RT)
|
||||
elseif(CONFIG_COVERAGE_MINI AND CONFIG_ARCH_TOOLCHAIN_CLANG)
|
||||
nuttx_add_system_library(rt.miniprofile)
|
||||
|
||||
target_include_directories(
|
||||
rt.miniprofile PRIVATE ${INCDIR}
|
||||
${CMAKE_CURRENT_LIST_DIR}/compiler-rt/lib/profile)
|
||||
|
||||
target_compile_options(rt.miniprofile PRIVATE -fno-profile-instr-generate
|
||||
-fno-coverage-mapping)
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ CSRCS += InstrProfilingPlatform.c
|
||||
|
||||
else ifeq ($(CONFIG_COVERAGE_MINI)$(CONFIG_ARCH_TOOLCHAIN_CLANG),yy)
|
||||
|
||||
FLAGS += ${INCDIR_PREFIX}$(CURDIR)/compiler-rt/compiler-rt/lib/profile
|
||||
FLAGS += -fno-profile-instr-generate -fno-coverage-mapping
|
||||
|
||||
CSRCS += coverage.c
|
||||
|
||||
Reference in New Issue
Block a user