mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Make LDC work with LLVM trunk (s/LinkOnceLinkage/LinkOnceOdrLinkage/)
Also moved the #defines for linkage types into a separate header instead of mars.h so we can #include revisions.h without having to rebuild the entire frontend every time we update. (I'm using revisions.h to get the LLVM revision for use in preprocessor conditionals. It should work with LLVM release 2.5, old trunk and new trunk)
This commit is contained in:
@@ -168,13 +168,21 @@ endif(CMAKE_MINOR_VERSION LESS 6)
|
||||
add_executable(${LDC_EXE} ${LDC_SOURCE_FILES})
|
||||
|
||||
# generate revision info
|
||||
configure_file(${PROJECT_SOURCE_DIR}/revisions.pl.in ${PROJECT_BINARY_DIR}/revisions.pl)
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/${DMDFE_PATH}/revisions.h
|
||||
COMMAND ${PERL_EXECUTABLE} ${PROJECT_BINARY_DIR}/revisions.pl
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${DMDFE_PATH}
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/revisions.pl.in
|
||||
${PROJECT_BINARY_DIR}/revisions.pl
|
||||
@ONLY
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/gen/revisions.h
|
||||
COMMAND ${PERL_EXECUTABLE} ${PROJECT_BINARY_DIR}/revisions.pl
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/gen
|
||||
)
|
||||
add_custom_target(
|
||||
gen_revs_h ALL
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/revisions.pl
|
||||
${PROJECT_BINARY_DIR}/gen/revisions.h
|
||||
)
|
||||
add_custom_target(gen_revs_h ALL DEPENDS ${PROJECT_BINARY_DIR}/${DMDFE_PATH}/revisions.h)
|
||||
add_dependencies(${LDC_EXE} gen_revs_h)
|
||||
#
|
||||
|
||||
|
||||
Reference in New Issue
Block a user