Commit Graph

248 Commits

Author SHA1 Message Date
Oscar Fuentes cc48b9ac0f Whe we build a shared library, add its list of used libraries to the
link command.

Fixed a pair of IF expressions too.

llvm-svn: 127546
2011-03-12 16:48:54 +00:00
Oscar Fuentes e503506048 Process some link components that map to other expandable components
before the main loop. This is necessary because the loop ignores the
items added to `link_components' after it is entered.

llvm-svn: 127333
2011-03-09 14:44:46 +00:00
Oscar Fuentes a693632dfd Remove remnant of my experimentation with CMake.
llvm-svn: 127244
2011-03-08 13:30:52 +00:00
Oscar Fuentes 318c3f1717 Support for parallel compilation (/MP) when using the VS IDE.
Patch by Erik Olofsson!

llvm-svn: 126847
2011-03-02 17:47:37 +00:00
Talin de422beba4 Added missing va_end().
llvm-svn: 126759
2011-03-01 18:00:49 +00:00
Tobias Grosser 1b4f94070f cmake: Add xdot.py support as it already exists in autoconf.
llvm-svn: 126563
2011-02-27 04:11:05 +00:00
Oscar Fuentes 2ece0b171f Export TARGET_TRIPLE on LLVM.cmake. It is necessary for running tests
on Clang when it builds using LLVM as an external library.

Fixes PR9293.

llvm-svn: 126309
2011-02-23 11:28:40 +00:00
Oscar Fuentes ab0465020b CMake: remove unnecessary variable.
llvm-svn: 126224
2011-02-22 15:40:20 +00:00
NAKAMURA Takumi 66242b85f0 CMake: Define LLVM_INCLUDE_TESTS in cmake/modules/HandleLLVMOptions.cmake. It affects testing stuff on clang-standalone build.
llvm-svn: 126107
2011-02-21 03:21:06 +00:00
NAKAMURA Takumi 27b0b5a997 CMake: Fix breakage on clang standalone build.
llvm-svn: 126106
2011-02-21 03:20:57 +00:00
Oscar Fuentes 3145e923c1 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

llvm-svn: 126092
2011-02-20 22:06:10 +00:00
Oscar Fuentes ba1186c23e Use explicit add_subdirectory's for LLVM target sublibraries instead
of testing for its presence at cmake time.

This way the build automatically regenerates the makefiles when a svn
update brings in a new sublibrary.

llvm-svn: 126068
2011-02-20 02:55:27 +00:00
Jeffrey Yasskin 139412e169 Add the PARSE_ARGUMENTS CMake macro to LLVM so I can use it to clean
up add_clang_unittest's calling convention.

llvm-svn: 126031
2011-02-19 18:01:15 +00:00
Oscar Fuentes 5ed962656c Move library stuff out of the toplevel CMakeLists.txt file.
llvm-svn: 125968
2011-02-18 22:06:14 +00:00
Oscar Fuentes c9b7c4af5a New library: LLVMX86Utils.
llvm-svn: 125786
2011-02-17 22:26:11 +00:00
NAKAMURA Takumi 860dc41218 CMake: LLVM_LIT_TOOLS_DIR is needed only on Win32 hosts to use GnuWin32 tools.
Unixen and Cygwin do not need it.

llvm-svn: 125277
2011-02-10 10:29:42 +00:00
NAKAMURA Takumi 5b4c155112 CMake: Add the new option LLVM_LIT_TOOLS_DIR. It can specify "Path to GnuWin32 tools".
llvm-svn: 125173
2011-02-09 04:18:58 +00:00
NAKAMURA Takumi 189111808e lib/Support/Errno.cpp: Check strerror_s() with HAVE_DECL_STRERROR_S in config.h.*.
AC_CHECK_FUNCS seeks a symbol only in libs. We should check the declaration in string.h.

FIXME: I have never seen mingw(s) have strerror_s() (not _strerror_s()).
FIXME: Autoconf/CMake may seek strerror_s() with the definition MINGW_HAS_SECURE_API in future.
llvm-svn: 125172
2011-02-09 04:18:48 +00:00
Oscar Fuentes 0209aec4c6 Install only *.cmake files. Don't install .svn directory.
Fixes PR9159.

llvm-svn: 125001
2011-02-07 02:22:23 +00:00
Oscar Fuentes 7dc9dce770 Don't define NDEBUG on MSVC_IDE and XCode builds. Fixes PR9155.
llvm-svn: 124985
2011-02-06 19:07:06 +00:00
Oscar Fuentes 3522179e36 Moved more stuff to HandleLLVMOptions.cmake
llvm-svn: 124968
2011-02-05 19:08:42 +00:00
NAKAMURA Takumi 03a541f5c4 Windows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.
config.h.* have conditions whether each symbol is defined or not.
Autoconf and CMake may check symbols in libgcc.a for JIT on Mingw.

llvm-svn: 124950
2011-02-05 15:11:53 +00:00
Oscar Fuentes 2761c7ab34 LLVM_ON_WIN32 is not defined on config-ix.cmake. Use something else.
llvm-svn: 124857
2011-02-04 05:40:04 +00:00
Oscar Fuentes a6aa87898b Add the tablegenned files to the `clean' target.
llvm-svn: 124854
2011-02-04 03:47:50 +00:00
Oscar Fuentes f4202ba475 Changes for building Clang and others using LLVM as an external
library.

Installs tblgen (required by Clang).

Translates handling of user settings and platform-dependant options to
its own file, where it can included by another project.

Installs the .cmake files required by projects like Clang.

llvm-svn: 124816
2011-02-03 20:57:36 +00:00
NAKAMURA Takumi 9795860250 cmake/*: Add svn:eol-style=native and fix CRLF.
llvm-svn: 124793
2011-02-03 11:41:27 +00:00
Oscar Fuentes ed27eadd29 Platform tests for `sys/uio.h' header and `writev' function.
This is the cmake equivalent for r124769.

llvm-svn: 124775
2011-02-03 04:23:07 +00:00
Oscar Fuentes e866c41f5c Adds some platform checks to cmake/config-ix.cmake and fixes checking
for dlopen/dlerror.

Patch by arrowdodger!

llvm-svn: 124590
2011-01-31 18:25:25 +00:00
Oscar Fuentes 632ad9bfe6 Don't show -pedantic, -W and -Wall on the output of
llvm-config --cflags --cxxflags --cppflags

We shouldn't impose those flags on people who use llvm-config for
building their own projects.

llvm-svn: 124399
2011-01-27 19:29:48 +00:00
Oscar Fuentes 6495595382 Handles libffi on the CMake build.
Patch by arrowdodger!

llvm-svn: 123976
2011-01-21 15:42:54 +00:00
Oscar Fuentes e65ed1c794 Add some platform checks. Also fix a typo on a Makefile.
Patch by arrowdodger!

llvm-svn: 123659
2011-01-17 16:35:14 +00:00
Oscar Fuentes 25ac830e72 Make config.h.cmake similar to config.h.in
Patch by arrowdodger!

llvm-svn: 123539
2011-01-15 13:35:37 +00:00
Oscar Fuentes 0a1b6b8ff2 Add some platform tests.
Patch by arrowdodger!

llvm-svn: 123388
2011-01-13 19:17:28 +00:00
Oscar Fuentes f8e26b123c Platform tests for argz_* functions.
Patch by arrowdodger!

llvm-svn: 123376
2011-01-13 15:06:32 +00:00
Oscar Fuentes c8cb58e130 Add to the CMake build some options and platform tests supported by
the traditional build.

Patch by arrowdodger!

llvm-svn: 123233
2011-01-11 12:31:54 +00:00
Oscar Fuentes 77c4f70123 Made llvm_replace_compiler_option more robust. Use it on
llvm_process_sources.

llvm-svn: 123232
2011-01-11 12:31:34 +00:00
Oscar Fuentes edfc184222 Rewrite handling of LLVM_ENABLE_PIC. It was being processed after
config.h was generated, so it had no effect on it.

Thanks to arrowdodger for pointing out this and a tentative patch.

llvm-svn: 123119
2011-01-09 14:34:39 +00:00
Oscar Fuentes 9bf259581c Don't use -O3 on Mingw, as people report it as unreliable. Use -O2
instead.

llvm-svn: 123028
2011-01-07 20:31:03 +00:00
Oscar Fuentes 0db031d532 TableGen.cmake: sometimes the .td file is not in the current directory
(clang/include/clang/Basic/StmtNodes.td, for instance, is tablegenned
from clang/include/clang/AST/CMakeLists.txt) so it is not contained on
the list of all .td files on the current source directory which is
used as the DEPENDS of the custom command. We must add the .td file to
the DEPENDS list of the custom command. Otherwise some .inc files are
not regenerated when the corresponding .td file changes.

llvm-svn: 122768
2011-01-03 20:01:32 +00:00
Oscar Fuentes 13ce15ca69 LLVMProcessSources: add .def files along with .h files to targets for
the benefit of project-based generators (VS, XCode, etc).

llvm-svn: 122749
2011-01-03 16:59:52 +00:00
Oscar Fuentes 3aea80b564 Propagate to parent scope changes made to CMAKE_CXX_FLAGS.
llvm-svn: 122692
2011-01-02 12:30:18 +00:00
Oscar Fuentes eb6d777882 CMake (MSVC): cmake automatically adds the /EHsc and /GR compiler
options. If we are building with exceptions/rtti disabled, we replace
/EHsc with /EHs-c- and /GR with /GR-, respectively. If we just add the
disabling options we get warnings like this:

cl : Command line warning D9025 : overriding '/EHs' with '/EHs-'

llvm-svn: 122648
2010-12-31 19:10:49 +00:00
Oscar Fuentes 9f2b3842a3 Fixes file extension for loadable modules on OS X.
Patch by Wesley Peck!

llvm-svn: 122395
2010-12-22 08:30:17 +00:00
Oscar Fuentes 029b1e3802 Update cmake library dependencies.
llvm-svn: 122239
2010-12-20 09:47:08 +00:00
Wesley Peck 15b1679cae Reverting commit to LLVMLibDeps that was inadvertently done in 121649.
llvm-svn: 121651
2010-12-12 22:28:51 +00:00
Wesley Peck 632b5926d3 The ADD and ADDK (and all variants) instructions where flip-flopped in the MBlaze backend. This bug fix makes 64-bit math work on the MBlaze backend.
llvm-svn: 121649
2010-12-12 22:02:31 +00:00
NAKAMURA Takumi a8c1c3fe22 Add dependency to "make check".
cmake/modules/AddLLVM.cmake: Add empty "phony" target in add_llvm_loadable_module() even if loadable module were not supported.

llvm-svn: 121455
2010-12-10 02:15:36 +00:00
Francois Pichet 82f3b5f945 Disable C++ exception handling on MSVC.
Total size of bin\Release on disk goes from 82.9 MB to 74.2 MB. (~10% saving)

llvm-svn: 120908
2010-12-04 14:30:22 +00:00
Francois Pichet 916fae2a34 Disable RTTI on Windows.
Total size of bin\Release on disk goes from 83.6 MB to 81.8MB. (~2% saving)

llvm-svn: 120901
2010-12-04 09:42:30 +00:00
Michael J. Spencer ca242f2c36 Support/FileSystem: Fix MinGW build. It doesn't have _chsize_s.
llvm-svn: 120826
2010-12-03 18:48:56 +00:00