This is an archive of the discontinued LLVM Phabricator instance.

[llvm][NFC] Remove definition from build system of LLVM_HAVE_TF_AOT
ClosedPublic

Authored by mtrofin on Jul 22 2020, 11:08 AM.

Details

Summary

We can just use the definition from config.h. This means we need to move
a few lines around in CMakeLists.txt - the TF_AOT detection needs to be
before the spot we process the config.h.cmake files.

Diff Detail

Event Timeline

mtrofin created this revision.Jul 22 2020, 11:08 AM
thakis accepted this revision.Jul 22 2020, 11:14 AM

Thanks!

This revision is now accepted and ready to land.Jul 22 2020, 11:14 AM
This revision was automatically updated to reflect the committed changes.
sanwou01 added a subscriber: sanwou01.EditedJul 23 2020, 2:21 AM

Are you sure you can include config.h in an installed header file? AFAICT, config.h isn't installed, but llvm-config.h is.

edit: this breaks the build of a certain downstream front-end for me

Are you sure you can include config.h in an installed header file? AFAICT, config.h isn't installed, but llvm-config.h is.

edit: this breaks the build of a certain downstream front-end for me

Ah, I see:

install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
    DESTINATION include
    COMPONENT llvm-headers
    FILES_MATCHING
    PATTERN "*.def"
    PATTERN "*.h"
    PATTERN "*.gen"
    PATTERN "*.inc"
    # Exclude include/llvm/CMakeFiles/intrinsics_gen.dir, matched by "*.def"
    PATTERN "CMakeFiles" EXCLUDE
    PATTERN "config.h" EXCLUDE
    PATTERN ".svn" EXCLUDE
    )

huh. How does include/llvm/Support/Windows/WindowsSupport.h include llvm/Config/config.h though... weird. In any case, I'll move the _AOT definition to llvm_config.h.cmake. Sorry for the trouble!

huh. How does include/llvm/Support/Windows/WindowsSupport.h include llvm/Config/config.h though... weird. In any case, I'll move the _AOT definition to llvm_config.h.cmake. Sorry for the trouble!

Looks like another bug if it's also in WindowsSupport.h ... but not one that is biting me at the moment. No worries and thanks for fixing!

stellaraccident added inline comments.
llvm/include/llvm/Analysis/InlineAdvisor.h
17

This seems to break installed builds because llvm/Config/config.h does not appear to be created in the installed tree. Do you mind if we roll back this change?

mtrofin marked 2 inline comments as done.Jul 23 2020, 10:00 PM
mtrofin added inline comments.
llvm/include/llvm/Analysis/InlineAdvisor.h
17