Skip to content

Commit

Permalink
Revert "[libc] Use LIBC_INCLUDE_DIR in CMake rules"
Browse files Browse the repository at this point in the history
This reverts commit 046deab since
it broke libc-aarch64-ubuntu-fullbuild-dbg.
  • Loading branch information
petrhosek committed Jul 5, 2023
1 parent 046deab commit e1cb592
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libc/cmake/modules/LLVMLibCObjectRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function(_build_gpu_objects fq_target_name internal_target_name)
${ARGN}
)

set(include_dirs ${LIBC_SOURCE_DIR} ${LIBC_INCLUDE_DIR})
set(include_dirs ${LIBC_BUILD_DIR}/include ${LIBC_SOURCE_DIR} ${LIBC_BUILD_DIR})
set(common_compile_options ${ADD_GPU_OBJ_COMPILE_OPTIONS})
if(NOT ADD_GPU_OBJ_CXX_STANDARD)
set(ADD_GPU_OBJ_CXX_STANDARD ${CMAKE_CXX_STANDARD})
Expand Down Expand Up @@ -585,7 +585,7 @@ function(create_entrypoint_object fq_target_name)
${ADD_ENTRYPOINT_OBJ_COMPILE_OPTIONS}
)
set(internal_target_name ${fq_target_name}.__internal__)
set(include_dirs ${LIBC_SOURCE_DIR} ${LIBC_INCLUDE_DIR})
set(include_dirs ${LIBC_BUILD_DIR}/include ${LIBC_SOURCE_DIR} ${LIBC_BUILD_DIR})
get_fq_deps_list(fq_deps_list ${ADD_ENTRYPOINT_OBJ_DEPENDS})
set(full_deps_list ${fq_deps_list} libc.src.__support.common)

Expand Down
12 changes: 8 additions & 4 deletions libc/cmake/modules/LLVMLibCTestRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ function(create_libc_unittest fq_target_name)
${fq_build_target_name}
PRIVATE
${LIBC_SOURCE_DIR}
${LIBC_INCLUDE_DIR}
${LIBC_BUILD_DIR}
${LIBC_BUILD_DIR}/include
)
target_compile_options(
${fq_build_target_name}
Expand Down Expand Up @@ -380,7 +381,8 @@ function(add_libc_fuzzer target_name)
${fq_target_name}
PRIVATE
${LIBC_SOURCE_DIR}
${LIBC_INCLUDE_DIR}
${LIBC_BUILD_DIR}
${LIBC_BUILD_DIR}/include
)

target_link_libraries(${fq_target_name} PRIVATE
Expand Down Expand Up @@ -510,7 +512,8 @@ function(add_integration_test test_name)
${fq_build_target_name}
PRIVATE
${LIBC_SOURCE_DIR}
${LIBC_INCLUDE_DIR}
${LIBC_BUILD_DIR}
${LIBC_BUILD_DIR}/include
)
target_compile_options(${fq_build_target_name}
PRIVATE -fpie -ffreestanding -fno-exceptions -fno-rtti ${INTEGRATION_TEST_COMPILE_OPTIONS})
Expand Down Expand Up @@ -674,7 +677,8 @@ function(add_libc_hermetic_test test_name)
${fq_build_target_name}
PRIVATE
${LIBC_SOURCE_DIR}
${LIBC_INCLUDE_DIR}
${LIBC_BUILD_DIR}
${LIBC_BUILD_DIR}/include
)
target_compile_options(${fq_build_target_name}
PRIVATE ${LIBC_HERMETIC_TEST_COMPILE_OPTIONS} ${HERMETIC_TEST_COMPILE_OPTIONS})
Expand Down

0 comments on commit e1cb592

Please sign in to comment.