[PATCH] D35559: [CMake][Modules] Tweak Modules-unfriendly builds

NAKAMURA Takumi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 18 06:01:03 PDT 2017


chapuni created this revision.
Herald added a subscriber: mgorny.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D35559

Files:
  cfe/trunk/tools/libclang/CMakeLists.txt
  llvm/trunk/lib/Fuzzer/CMakeLists.txt
  llvm/trunk/tools/gold/CMakeLists.txt
  llvm/trunk/tools/llvm-config/CMakeLists.txt
  llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt
  llvm/trunk/utils/unittest/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35559.107082.patch
Type: text/x-patch
Size: 3816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170718/d2abb7e6/attachment.bin>


More information about the cfe-commits mailing list