Page MenuHomePhabricator

[CMake][Modules] Tweak Modules-unfriendly builds
Needs ReviewPublic

Authored by chapuni on Jul 18 2017, 6:00 AM.

Details

Summary

I can commit changes partially.

  • Add -fmodules-ignore-macro (llvm-config, libclang)

Their -DMACROs don't change headers' behavior. Just let them ignored.

  • Unittests

They use -frtti. I thought they may be built w/o modules. Any better idea?

  • DynamicLibraryTests

It doesn't use add_llvm_library(). Give -fno-modules with target_compile_options().

  • libFuzzer

It doesn't depend on LLVM libraries. Just suppressing with -fno-modules.

  • LLVMgold

    add_definitions( -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 )

It prevents reusing modules. I think they may be pruned since HandleLLVMOptions.cmake provides them conditionally.

Diff Detail

Repository
rL LLVM

Event Timeline

chapuni created this revision.Jul 18 2017, 6:00 AM
dblaikie edited edge metadata.Jul 18 2017, 10:59 AM

I know Richard Smith has a modules buildbot - so I'm curious: How is it working without these changes? Are these changes an effort to broaden the coverage of modular self hosting builds (what's the current coverage? (only LLVM proper) what's the new coverage? (all LLVM subprojects?))

Is this change still relevant?