diff --git a/src/runtime/CMakeLists.txt b/src/runtime/CMakeLists.txt index 4f6c8cb457a0..18a83e922405 100644 --- a/src/runtime/CMakeLists.txt +++ b/src/runtime/CMakeLists.txt @@ -24,6 +24,8 @@ if(LLVM) FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/../include/lean/lean.h" LEAN_H) # generate LLVM IR for `static inline` definitions in lean.h for the LLVM backend string(REPLACE "static inline" "__attribute__((always_inline))" LEAN_H "${LEAN_H}") + # drop '#pragma once' in .c file to avoid warning + string(REPLACE "#pragma once" "" LEAN_H "${LEAN_H}") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lean_inlines.c" "${LEAN_H}") message("Generating LLVM bitcode file for Lean runtime at '${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lean.h.bc'") add_custom_command( diff --git a/stage0/src/runtime/CMakeLists.txt b/stage0/src/runtime/CMakeLists.txt index 4f6c8cb457a0..18a83e922405 100644 --- a/stage0/src/runtime/CMakeLists.txt +++ b/stage0/src/runtime/CMakeLists.txt @@ -24,6 +24,8 @@ if(LLVM) FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/../include/lean/lean.h" LEAN_H) # generate LLVM IR for `static inline` definitions in lean.h for the LLVM backend string(REPLACE "static inline" "__attribute__((always_inline))" LEAN_H "${LEAN_H}") + # drop '#pragma once' in .c file to avoid warning + string(REPLACE "#pragma once" "" LEAN_H "${LEAN_H}") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lean_inlines.c" "${LEAN_H}") message("Generating LLVM bitcode file for Lean runtime at '${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lean.h.bc'") add_custom_command(