use is deprecated in favour of llvm_map_components_to_libnames()
Although message(DEPRECATION "msg") would probably be a better fit this
does nothing if CMAKE_ERROR_DEPRECATED and CMAKE_WARNING_DEPRECATED are
both off, which is the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214078 91177308-0d34-0410-b5e6-96231b3b80d8
of LLVM using CMake can easily find the tools directory.
LLVM_BUILD_TOOLS_BINARY_DIR was removed because it is now
superfluous.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213674 91177308-0d34-0410-b5e6-96231b3b80d8
clients of LLVM know if RTTI and/or EH were enabled in the build of
LLVM they are trying to link against.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213664 91177308-0d34-0410-b5e6-96231b3b80d8
to globally be controlled. Individual targets (e.g. ExceptionDemo) can
still override this by using LLVM_REQUIRE_RTTI and LLVM_REQUIRE_EH if
they need to be compiled with RTTI or exception handling respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213663 91177308-0d34-0410-b5e6-96231b3b80d8
Removing the native CMakeCache.txt causes the target to get re-run needlessly
on some systems. We'll want another solution for that part of the fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213099 91177308-0d34-0410-b5e6-96231b3b80d8
This adds support for building native artifacts when cross-compiling using the
popular side-by-side source directory layout (no symlinks, no nested
repositories).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213091 91177308-0d34-0410-b5e6-96231b3b80d8
It turns out this commit was fine. The problem was in the legacy build system (fixed r213010).
This reverts commit r213005.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213015 91177308-0d34-0410-b5e6-96231b3b80d8
This broke one of the builds, presumably side-by-side modular CMake.
Investigating.
This reverts commit r212998.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213005 91177308-0d34-0410-b5e6-96231b3b80d8
clang r212997 incorporated these settings into its own build system. They no
longer need to be set from LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212998 91177308-0d34-0410-b5e6-96231b3b80d8
For example, c-index-test.exe requires just libclang.dll (its import library).
When libraries in libclang were not PRIVATE but PUBLIC, c-index-test required libraries transitive by libclang.
Note, on mingw with BUILD_SHARED_LIBS, library dependencies would become more strict.
In principle, required libraries should be "required in its source file".
This will help to detect missing dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212934 91177308-0d34-0410-b5e6-96231b3b80d8
On Win32.DLL, it points not lib but bin.
LIBRARY_OUTPUT_DIRECTORY affects add_library(MODULE), especially Win32.DLL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212903 91177308-0d34-0410-b5e6-96231b3b80d8
This -f group flag appears to influence linker flags, breaking the usual rules
and causing CMake's link invocation to fail during feature detection due to
missing link dependencies (msan_*).
Let's forcibly add it for now to get things the way they were before feature
detection started working.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212590 91177308-0d34-0410-b5e6-96231b3b80d8
When LLVM_ENABLE_TIMESTAMPS has been disabled we can prevent the preprocessor
from embedding dates, times and file timestamps.
There are a few motivations for this:
1) Validate the recent CMake feature detection bugfix from LLVM r212586 with
a flag that's not actually available everywhere.
2) Dogfood clang's new -Wdate-time warning from r210511 when bootstrapping.
3) Encourage reproducible builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212587 91177308-0d34-0410-b5e6-96231b3b80d8
add_flag_if_supported() and add_flag_or_print_warning() were effectively
no-ops, just returning the value of the first result (usually
'-fno-omit-frame-pointer') for all subsequent checks for different flags.
Due to the way CMake caches feature detection results, we need to provide
symbolic variable names which will persist the cached results. This commit
fixes feature detection using these two macros.
The feature checks now run and get stored correctly, and the correct output can
be observed in configure logs:
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212586 91177308-0d34-0410-b5e6-96231b3b80d8
FIXME: Make this configurable.
FIXME: "ENABLE_SHARED" doesn't make sense, since it is used just for plugins. We may rename it.
I introduced config.enable_shared in r120273.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212315 91177308-0d34-0410-b5e6-96231b3b80d8
By default, CMake will set NDEBUG in Rel* builds and leave it off in
debug builds, so we shouldn't need to do anything ourselves.
Before this change, it was possible to a Debug build without assertions
(aka Debug-Asserts in the autoconf system) by configuring with
-DLLVM_ENABLE_ASSERTIONS=OFF, but this configuration isn't very useful.
You can still get the same effect by explicitly adding -DNDEBUG to
CFLAGS.
Differential Revision: http://reviews.llvm.org/D4257
Patch by Janusz Sobczak!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211919 91177308-0d34-0410-b5e6-96231b3b80d8
The option LLVM_ENABLE_SPHINX option enables the "docs-llvm-html",
"docs-llvm-man" targets but does not build them by default. The
following CMake options have been added that control what targets are
made available
SPHINX_OUTPUT_HTML
SPHINX_OUTPUT_MAN
If LLVM_BUILD_DOCS is enabled then the enabled docs-llvm-* targets will
be built by default and if ``make install`` is run then docs-llvm-html
and docs-llvm-man will be installed (tested on Linux only).
The add_sphinx_target function is in its own file so it can be included
by other projects that use Sphinx for their documentation.
Patch by Daniel Liew <daniel.liew@imperial.ac.uk>!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206655 91177308-0d34-0410-b5e6-96231b3b80d8
add_definitions shouldn't really be used for compiler flags, and the variable
LLVM_DEFINITIONS is not appropriately used at the moment, e.g. it's not exported
to LLVMConfig.cmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203792 91177308-0d34-0410-b5e6-96231b3b80d8
I personally build with these settings enabled all the time, and it
is clearer to see the actual warning flags (e.g., -Wuninitialized)
get passed by Xcode rather than seeing -Wno-uninitialized followed
by -Wall (the latter canceling out the former) and figuring out
what is going on.
Xcode will ignore build settings it doesn't understand, so this will
work on possibly older versions of Xcode that don't support all
of these settings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203760 91177308-0d34-0410-b5e6-96231b3b80d8
Without this common features like off_t and strdup are missing.
This should bring back those bots.
Configure bits by Meador Inge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203701 91177308-0d34-0410-b5e6-96231b3b80d8
LLVM_ENABLE_CXX1Y (default *off*). =D C++98 is dead. Long live C++11.
I don't exactly recommend using C++1y just yet though...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202567 91177308-0d34-0410-b5e6-96231b3b80d8
target_link_libraries(INTERFACE) doesn't bring inter-target dependencies in add_library,
although final targets have dependencies to whole dependent libraries.
It makes most libraries can be built in parallel.
target_link_libraries(PRIVATE) is used to shaared library.
Each dependent library is linked to the target.so, and its user will not see its grandchildren.
For example,
- libclang.so has sufficient libclang*.a(s).
- c-index-test requires just only libclang.so.
FIXME: lld is tweaked minimally. Adding INTERFACE in each library would be better thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202241 91177308-0d34-0410-b5e6-96231b3b80d8
The LLVMSupport library implementation consolidates all dependencies on
system libraries. Move the logic gathering system libraries out of
'cmake/modules/LLVM-Config.cmake' and into 'lib/Support/CMakeLists.txt'.
Use the target_link_libraries() command there to tell CMake about the
link dependencies of the LLVMSupport implementation. CMake will
automatically propagate this to all targets that link LLVMSupport
directly or indirectly.
We still need to build knowledge of system library dependencies into
'llvm-config'. Store the list of libraries needed in a property on
LLVMSupport and teach 'tools/llvm-config/CMakeLists.txt' to retrieve it
from there.
Drop all calls to 'link_system_libs' and 'get_system_libs' from our
CMake code. Replace their implementations with a warning that explains
the calls are no longer necessary. Also drop from 'LLVMConfig.cmake'
the HAVE_* and related variables that were published there only to allow
'get_system_libs' to run outside our build process.
Contributed by Brad King.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201969 91177308-0d34-0410-b5e6-96231b3b80d8
llvm_add_library(foo SHARED STATIC
DEPENDS <dependent targets...>
LINK_LIBS <required libraries...>
)
It generates both foo (foo.so) and foo_static(foo.a) and both of them depend on DEPENDS and LINK_LIBS.
Then, also obj.foo is generated. obj.foo depends on DEPENDS, but doesn't depend on LINK_LIBS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201854 91177308-0d34-0410-b5e6-96231b3b80d8
The module still needs to collect the list of all available libraries
in order to satisfy the 'all' component. Provide this in the package
configuration file, 'LLVMConfig.cmake', as a LLVM_AVAILABLE_LIBS
variable. (A variable is scoped better than a global property.)
Since this won't be set for our own build, fall back to looking up the
LLVM_LIBS property to get the value when it is not set.
Contributed by Brad King.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201853 91177308-0d34-0410-b5e6-96231b3b80d8
LLVM library names are now available as logical CMake targets both
to our own build and to application CMake code. Replace use of
'list(FIND)' with a simple 'if(TARGET)' to determine whether a
library is available.
Contributed by Brad King.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201852 91177308-0d34-0410-b5e6-96231b3b80d8