Update and fix LLVM_ENABLE_MODULES:
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 16 Apr 2016 00:48:58 +0000 (00:48 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 16 Apr 2016 00:48:58 +0000 (00:48 +0000)
commit2db6f2e508126d237435a4d43af8076bf74f641d
treeb0c1f523759f2fb1ea36353d016035ef3afaf00c
parent20d4701b3d8ac65e9d2e249e7cbc3bda58fd6902
Update and fix LLVM_ENABLE_MODULES:

1) We need to add this flag prior to adding any other, in case the user has
specified a -fmodule-cache-path= flag in their custom CXXFLAGS. Such a flag
causes -Werror builds to fail, and thus all config checks fail, until we add
the corresponding -fmodules flag. The modules selfhost bot does this, for
instance.

2) Delete module maps that were putting .cpp files into modules.

3) Enable -fmodules-local-submodule-visibility, to get proper module
visibility rules applied across submodules of the same module. Disable
-fmodules for C builds, since that flag is not available there.

llvm-svn: 266502
llvm/cmake/modules/HandleLLVMOptions.cmake
llvm/lib/AsmParser/module.modulemap [deleted file]
llvm/lib/Bitcode/module.modulemap [deleted file]
llvm/lib/CodeGen/module.modulemap [deleted file]
llvm/lib/DebugInfo/DWARF/module.modulemap [deleted file]
llvm/lib/IR/module.modulemap [deleted file]
llvm/lib/TableGen/module.modulemap [deleted file]
llvm/utils/TableGen/module.modulemap [deleted file]