Commit Graph

407 Commits

Author SHA1 Message Date
Chandler Carruth 87dfb1d3fe Add a missing common variable to the lit.site.cfg generation. This was
only used in the Clang tree, but it seems reasonable to support.

llvm-svn: 159399
2012-06-29 00:40:15 +00:00
Chandler Carruth 3511dd30c8 Move the setup for variables that are expanded in the lit.site.cfg into
a dedicated helper function. This will enable re-using the same logic
for Clang's lit setup, etc.

llvm-svn: 159333
2012-06-28 06:36:24 +00:00
NAKAMURA Takumi 1171e816ba LLVMProcessSources.cmake: [MSVC] Don't add "PROPERTIES HEADER_FILE_ONLY" to *.def.
FIXME: Shall we put *.def(s) to the folder?
llvm-svn: 159102
2012-06-24 03:50:58 +00:00
Chandler Carruth 582e8a5d42 Avoid using the recently added APPEND_STRING feature. This should
restore support for CMake versions before 2.8.6 -- sorry for the
trouble!

llvm-svn: 158930
2012-06-21 18:44:24 +00:00
Chandler Carruth 94d0251824 Completely refactor the structuring of unittest CMake files to match the
Makefiles, the CMake files in every other part of the LLVM tree, and
sanity.

This should also restore the output tree structure of all the unit
tests, sorry for breaking that, and thanks for letting me know.

The fundamental change is to put a CMakeLists.txt file in the unittest
directory, with a single test binary produced from it. This has several
advantages:

- No more weird directory stripping in the unittest macro, allowing it
  to be used more readily in other projects.
- No more directory prefixes on all the source files.
- Allows correct and precise use of LLVM's per-directory dependency
  system.
- Allows use of the checking logic for source files that have not been
  added to the CMake build. This uncovered a file being skipped with
  CMake in LLVM and one in Clang's unit tests.
- Makes Specifying conditional compilation or other custom logic for JIT
  tests easier.

It did require adding the concept of an explicit 'optional' source file
to the CMake build so that the missing-file check can skip cases where
the file is *supposed* to be missing. =]

This is another chunk of refactoring the CMake build in order to make it
usable for other clients like CompilerRT / ASan / TSan.

Note that this is interdependent with a Clang CMake change.

llvm-svn: 158909
2012-06-21 09:51:26 +00:00
Chandler Carruth a5d42f83f9 Factor the logic for setting up a GoogleTest unit test executable into
a helper function in CMake. This will allow us to share all of this
logic with Clang, and eventually CompilerRT.

llvm-svn: 158896
2012-06-21 05:16:58 +00:00
Chandler Carruth e530d2ba4d Remove one of the LLVM-specific CMake hacks in favor of standard CMake
facilities.

This was only used in one place in LLVM, and was used pervasively (but
with different code!) in Clang. It has no advantages over the standard
CMake facilities and in some cases disadvantages.

llvm-svn: 158889
2012-06-21 01:35:09 +00:00
NAKAMURA Takumi e0d4a7c5be TableGen.cmake: Fix to work without LLVM_COMMON_DEPENDS.
llvm-svn: 158650
2012-06-17 15:41:56 +00:00
Tobias Grosser b32ad40188 cmake: Pass the -m32 flag to modules if LLVM_BUILD_32_BITS is enabled
This was previously only done for executables and shared libraries, but not
for modules. As modules are essentially shared libraries (that need to be
dlopened explicitly), threating them the same as shared libraries seems
reasonable. This fixes the LLVM_BUILD_32_BITS build of Polly.

Contributed by: Ondra Hosek  <ondra.hosek@gmail.com>

llvm-svn: 158195
2012-06-08 09:41:23 +00:00
Michael J. Spencer aeb59e1d0d [CMake] Promote extension warnings to errors.
llvm-svn: 158176
2012-06-07 23:33:56 +00:00
Michael J. Spencer 08180c325f [CMake] Order MSVC warnings numerically.
llvm-svn: 158171
2012-06-07 21:34:31 +00:00
Michael J. Spencer 6d45d834a7 [CMake] Adjust MSVC warnings.
Remove /Wall from LLVM_ENABLE_WARNINGS (it's useless) and promote 4239
to a level 1 warning.

llvm-svn: 158170
2012-06-07 21:34:15 +00:00
Tim Northover f6e29c4771 Fix how CMake appends -m32 to linker command-lines
llvm-svn: 157337
2012-05-23 18:42:02 +00:00
Rafael Espindola ac57583236 Adding -fcolor-diagnostics is causing problem to users that parse the build
output. Peter Collingbourne also reports that it is showing up in
$(llvm-config --cflags).

Revert this for now since I don't know enough cmake to fix it properly.

This reverts commit 18efed7adc79c1970f307bb5b015d199012ba872.

llvm-svn: 156392
2012-05-08 18:11:06 +00:00
Daniel Dunbar 407a85e7a6 [build] Add build check for ::arc4random().
llvm-svn: 156236
2012-05-05 16:36:16 +00:00
Rafael Espindola 1abcf64283 Pass -fcolor-diagnostics when it is supported. This makes a difference when
using cmake+ninja, since ninja buffers the compiler output.

llvm-svn: 156150
2012-05-04 03:23:36 +00:00
Ted Kremenek 1233895097 Add rudimentary CMake logic for detecting Graphviz.
llvm-svn: 156108
2012-05-03 21:51:05 +00:00
Michael J. Spencer e734f5417f [CMake] Restructure how Clang, Polly and other external projects get included.
While making lld build under the tools directory I decided to refactor how this
works.

There is now a macro, add_llvm_external_project, which takes the name of the
expected subdirectory. This sets up two CMake options.

 * LLVM_EXTERNAL_${NAME}_SOURCE_DIR
     This is the path to the source. It defaults to
     ${CMAKE_CURRENT_SOURCE_DIR}/${name}.
 * LLVM_EXTERNAL_${NAME}_BUILD
     Enable and disable building the tool as part of LLVM.

I chose LLVM_EXTERNAL_${NAME} as a prefix so they all show up together in the
GUI.

llvm-svn: 155654
2012-04-26 19:43:35 +00:00
NAKAMURA Takumi 75bfe69282 CMake: Enable LLVM_COMPILER_JOBS on all MS IDEs. We don't support older environments than VS9.
llvm-svn: 155285
2012-04-21 14:51:02 +00:00
NAKAMURA Takumi a83601d637 CMake: Prune redundant LLVM_COMPILER_JOBS from llvm/CMakeLists.txt. HandleLLVMOptions.cmake has it.
llvm-svn: 155284
2012-04-21 14:50:56 +00:00
Eric Christopher 56079c1e72 Add InitializeNativeTargetDisassembler function.
Patch by Ojab.

llvm-svn: 153476
2012-03-26 21:56:56 +00:00
Michael J. Spencer 35145f830a Minimal changes for LLVM to compile under VS11.
llvm-svn: 151849
2012-03-01 22:42:52 +00:00
Rafael Espindola 42e94d11a1 Enable -Wcovered-switch-default again, but add -Werror to the checks to make
sure we don't use it with compilers that don't support it.

llvm-svn: 151665
2012-02-28 23:32:06 +00:00
Chandler Carruth 0bd3913d96 Temporarily revert r151609, which enabled a new warning for LLVM and
Clang builds. The detection logic for compilers that support the warning
isn't working. Rafael is going to investigate it, but didn't want people
to have to wade through build spam until then.

llvm-svn: 151649
2012-02-28 19:26:56 +00:00
Rafael Espindola 334eaeae8e Enable -Wcovered-switch-default as it matches the switch style used in llvm.
llvm-svn: 151609
2012-02-28 02:01:55 +00:00
Dylan Noblesmith c6c7a5819d add LLVM_VERSION_MAJOR and _MINOR defines
This is useful for clients that want to maintain compatibility
across multiple releases of LLVM. Currently users like Klee and
Mesa all have to roll their own 'parse llvm-config --version
output and generate defines' solution.

Also reuse the new macros so that version information is less
redundant/likely to fall out of sync again in the future.

llvm-svn: 150405
2012-02-13 18:48:10 +00:00
NAKAMURA Takumi 20b3359f75 CMake: Add the folder "Tablegenning" on llvm-tblgen targets.
llvm-svn: 149219
2012-01-30 03:01:03 +00:00
Rafael Espindola f47efbc07d -fvisibility-inlines-hidden is a c++ only option.
Thanks to Peter Collingbourne for noticing it.

llvm-svn: 148913
2012-01-25 03:39:26 +00:00
Chandler Carruth beb3e7e076 Undo an over zealous rename. This bit of the CMake build really is
dealing in the host triple, be honest about it and document the decision
to default the target triple to the host triple unless overridden.

llvm-svn: 148822
2012-01-24 18:00:44 +00:00
Rafael Espindola 9f404cc421 Don't use -fvisibility-inlines-hidden on mingw to try to avoid a lot of
warnings from gcc.

llvm-svn: 148539
2012-01-20 13:10:10 +00:00
Rafael Espindola 5258ab885b cmake: pass -fvisibility-inlines-hidden if it is supported. In a
Release+Asserts build with -DBUILD_SHARED_LIBS=ON, the install
directory goes from 72MB to 70MB.

llvm-svn: 148530
2012-01-20 04:07:48 +00:00
Sebastian Pop 99ab273a77 revert r147542 after comments from Joerg Sonnenberger
llvm-svn: 147608
2012-01-05 18:28:46 +00:00
Sebastian Pop 0f357d6c22 use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJIT
Get back getHostTriple.

For JIT compilation, use the host triple instead of the default
target: this fixes some JIT testcases that used to fail when the
compiler has been configured as a cross compiler.

llvm-svn: 147542
2012-01-04 19:47:22 +00:00
Ted Kremenek 6ea1b76d71 Use 'check_symbol_exists' instead of 'check_function_exists' for finding isatty. This change allows Xcode generated projects to have HAVE_ISATTY to be properly defined.
llvm-svn: 147215
2011-12-23 01:31:45 +00:00
NAKAMURA Takumi 1b745d0086 Tweak CMake build on Cygwin.
llvm-svn: 146725
2011-12-16 06:21:08 +00:00
Dylan Noblesmith 1fc35ec5a1 cmake: work with CMake < 2.8.5
CMake versions 2.8.4 and earlier were giving this error since r146323:
"string end index: -1 is out of range 0 - 6"

Passing -1 as the length of the desired substring was a new feature
added in CMake 2.8.5:
http://www.cmake.org/Bug/view.php?id=10740

llvm-svn: 146372
2011-12-12 13:06:25 +00:00
Chandler Carruth 29dad49cfd Use a simpler and more reliable command for converting from HEAD to
commit-ish. Funny thing, they have a command designed for this. ;]

llvm-svn: 146325
2011-12-10 10:18:47 +00:00
Chandler Carruth 7514da903c Teach the VCS detection to set some root-level variables with the raw
revision and git commit data extracted. This will be used in the Clang
CMake build to avoid trying to re-detect the information.

llvm-svn: 146324
2011-12-10 10:04:38 +00:00
Chandler Carruth 667f217a54 At the request of Michael Spencer, make the VCS version detection logic
in CMake a bit more handy. Previously we would get such charming
versions as the following for revision NNNN and commit-ish XXXXX:
  3.1svnsvn-rNNNN
  3.1svngit-svn-rNNNN
  3.1svngit-svn-XXXXX

The mechanism selecting betwene the latter two was particularly odd, and
didn't work with all of the ways git-svn repos are set up apparently. It
also misses an important point -- both the revision *and* the git commit
might be relevant when working on a local branch some distance from
mainline. The new logic does several things:

1) It strips the redundant initial 'svn'.
2) It always looks for a git-svn revision number base, and when found
   includes it in the version.
3) If the git commit-ish for the current HEAD is not exactly that
   revision number, it is also included.

The resulting strings should roughly be:
  3.1svn-rNNNN
  3.1git-svn-rNNNN
  3.1git-svn-rNNNN-XXXXX

Suggestions on formatting etc always welcome. =] I've only looked at the
LLVM version string here, not Clang's (yet).

Note that the commit-ish reported is *not* terribly accurate. It updates
when 'cmake' is run, not when the binary is built. Still, it may be
better than nothing, especially if people have fairly long-lived git
repos and branches. This is not a new limitation, just didn't want
anyone to be surprised.

llvm-svn: 146323
2011-12-10 09:41:13 +00:00
Chandler Carruth 98e642db2c Fix InitializeNativeTargetAsmParser in CMake builds by defining the
appropriate macro. Patch by Alexey Prokhin. Fixes PR11498.

llvm-svn: 146239
2011-12-09 03:31:58 +00:00
Daniel Dunbar 539d0a8a09 build/CMake: Finish removal of add_llvm_library_dependencies.
llvm-svn: 145420
2011-11-29 19:25:30 +00:00
Daniel Dunbar faaa76d1b7 build/cmake: Switch to using llvm-build computed dependencies.
- I verified locally that the current dependency lists are identical.
 - This makes add_llvm_library_dependencies() a no-op. I'll remove it once this
   change passes the bots.

llvm-svn: 145355
2011-11-29 01:31:52 +00:00
Dylan Noblesmith efddf20126 rename ENABLE_THREADS to LLVM_ENABLE_THREADS
Now that it needs to be exported in a public header (Valgrind.h)
it should be prefixed to avoid collision with other projects.
Add it to llvm-config.h as well.

This'll require regenerating the configure script after this
commit, but I don't have the required autoconf version.

llvm-svn: 145214
2011-11-28 00:48:58 +00:00
Benjamin Kramer e1effb0da2 Add configure checking for pread(2) and use it to save a syscall when reading files.
llvm-svn: 145061
2011-11-22 12:31:53 +00:00
NAKAMURA Takumi 012d681acd Fix CRT selection logic when using CMake NMake generator.
CMAKE_CONFIGURATION_TYPES is only set on Visual Studio generators.  For NMake CMAKE_BUILD_TYPE is used instead.

Patch by EJose Fonseca!

llvm-svn: 143898
2011-11-06 23:37:22 +00:00
Daniel Dunbar 10fa2df7c5 build/cmake: Move all the user controllable options into top-level CMakeLists
for consistency.

llvm-svn: 143728
2011-11-04 19:04:35 +00:00
Chandler Carruth 3198cc7376 Fix a typo noticed by Peter Collingbourne. No one depends on this
working today, but it shouldn't corrupt state for some poor soul to
debug later.

llvm-svn: 143545
2011-11-02 16:55:57 +00:00
Chandler Carruth 39bf89b382 The TableGen parts of the CMake build are seriously broken. This fixes
one aspect of them by having them use the (annoying, if not broken)
proper library dependency model for adding the LLVMTableGen library as
a dependency. This could manifest as a link order issue in the presence
of separate LLVM / Clang source builds with CMake and a linker that
really cares about such things.

Also, add the Support dependency to llvm-tblgen itself so that it
doesn't rely on TableGen's transitive Support dependency. A parallel
change for clang-tblgen will be forthcoming.

llvm-svn: 143531
2011-11-02 05:03:06 +00:00
Sebastian Pop ec2fb226d8 rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE
llvm-svn: 143501
2011-11-01 21:31:44 +00:00
Dan Gohman 4c9fca99c9 Remove the Alpha backend.
llvm-svn: 143164
2011-10-27 22:56:32 +00:00
NAKAMURA Takumi c5554c9de3 Add -D__STDC_FORMAT_MACROS to use PRIx64.
llvm-svn: 141663
2011-10-11 12:51:44 +00:00
NAKAMURA Takumi e63cd198ba cmake/modules/HandleLLVMOptions.cmake: Reorder __STDC_CONSTANT_MACROS and __STDC_LIMIT_MACROS.
llvm-svn: 141662
2011-10-11 12:51:36 +00:00
Peter Collingbourne fb3d935649 Build system infrastructure for multiple tblgens.
llvm-svn: 141266
2011-10-06 01:51:51 +00:00
Eric Christopher 4418a60272 Rename LLVM_MULTITHREADED define and fix build without threads.
Patch by Arrowdodger.

llvm-svn: 140064
2011-09-19 20:43:23 +00:00
Chandler Carruth ada9aa2b98 Complete the removal of FindBison from CMake. Noticed this when browsing
some CMake patch backlog...

llvm-svn: 139107
2011-09-04 23:29:12 +00:00
NAKAMURA Takumi b3457c9eef CMake: [MSVC] Suppress C4551 'function call missing argument list'.
(void)static_func; it is used as idiom in llvm source tree to suppress "Unused static function" warnings.

llvm-svn: 137800
2011-08-17 01:28:30 +00:00
NAKAMURA Takumi 46568bdb6e cmake/modules/FindBison.cmake: It must be unneeded any more.
llvm-svn: 137715
2011-08-16 11:10:54 +00:00
NAKAMURA Takumi 0d888ad7bb CMake: Eliminate unused checks and #undef(s) as below;
STACK_DIRECTION
YYTEXT_POINTER
HAVE_NAMESPACES
HAVE_STD_ITERATOR
HAVE_FWD_ITERATOR
HAVE_BI_ITERATOR
HAVE_GLOBAL_HASH_MAP
HAVE_GLOBAL_HASH_SET
HAVE_GNU_EXT_HASH_MAP
HAVE_GNU_EXT_HASH_SET
HAVE_STD_EXT_HASH_MAP
HAVE_STD_EXT_HASH_SET

llvm-svn: 137423
2011-08-12 03:27:48 +00:00
Chandler Carruth b58053bb41 Remove yet another buried and hidden implicit dependency: every single
sub-library for the targets depended on the core target CodeGen library.
This completely undermined the careful work to separate the those
libraries, especially the MC-layer ones. This surfaced as circular
dependencies when the libraries were built as shared libraries where
CMake doesn't allow cycles.

This should fix PR10537. I'll watch the bots to see if there is fallout
on other platforms.

llvm-svn: 136565
2011-07-30 08:47:05 +00:00
Chandler Carruth 68b23116cb Make my attempt to build up global deps variables actually utilize
globally scoped constructs. Also, round-trip these dependencies through
the LLVMConfig.cmake.in file thata is used by CMake-based clients of
"installed" (or built) LLVM trees.

llvm-svn: 136543
2011-07-29 23:52:01 +00:00
Chandler Carruth 9d7feab3e0 Rewrite the CMake build to use explicit dependencies between libraries,
specified in the same file that the library itself is created. This is
more idiomatic for CMake builds, and also allows us to correctly specify
dependencies that are missed due to bugs in the GenLibDeps perl script,
or change from compiler to compiler. On Linux, this returns CMake to
a place where it can relably rebuild several targets of LLVM.

I have tried not to change the dependencies from the ones in the current
auto-generated file. The only places I've really diverged are in places
where I was seeing link failures, and added a dependency. The goal of
this patch is not to start changing the dependencies, merely to move
them into the correct location, and an explicit form that we can control
and change when necessary.

This also removes a serialization point in the build because we don't
have to scan all the libraries before we begin building various tools.
We no longer have a step of the build that regenerates a file inside the
source tree. A few other associated cleanups fall out of this.

This isn't really finished yet though. After talking to dgregor he urged
switching to a single CMake macro to construct libraries with both
sources and dependencies in the arguments. Migrating from the two macros
to that style will be a follow-up patch.

Also, llvm-config is still generated with GenLibDeps.pl, which means it
still has slightly buggy dependencies. The internal CMake
'llvm-config-like' macro uses the correct explicitly specified
dependencies however. A future patch will switch llvm-config generation
(when using CMake) to be based on these deps as well.

This may well break Windows. I'm getting a machine set up now to dig
into any failures there. If anyone can chime in with problems they see
or ideas of how to solve them for Windows, much appreciated.

llvm-svn: 136433
2011-07-29 00:14:25 +00:00
Oscar Fuentes 2d1e353966 Updated cmake library dependencies.
llvm-svn: 136327
2011-07-28 02:33:33 +00:00
Chandler Carruth 35c383eca4 Still more library dependency updates. This reflects the ever decreasing
dependence on CodeGen layers and backends from the MC layers.

llvm-svn: 136024
2011-07-26 00:09:11 +00:00
Chandler Carruth 97c069c1d2 Clean up a pile of hacks in our CMake build relating to TableGen.
The first problem to fix is to stop creating synthetic *Table_gen
targets next to all of the LLVM libraries. These had no real effect as
CMake specifies that add_custom_command(OUTPUT ...) directives (what the
'tablegen(...)' stuff expands to) are implicitly added as dependencies
to all the rules in that CMakeLists.txt.

These synthetic rules started to cause problems as we started more and
more heavily using tablegen files from *subdirectories* of the one where
they were generated. Within those directories, the set of tablegen
outputs was still available and so these synthetic rules added them as
dependencies of those subdirectories. However, they were no longer
properly associated with the custom command to generate them. Most of
the time this "just worked" because something would get to the parent
directory first, and run tablegen there. Once run, the files existed and
the build proceeded happily. However, as more and more subdirectories
have started using this, the probability of this failing to happen has
increased. Recently with the MC refactorings, it became quite common for
me when touching a large enough number of targets.

To add insult to injury, several of the backends *tried* to fix this by
adding explicit dependencies back to the parent directory's tablegen
rules, but those dependencies didn't work as expected -- they weren't
forming a linear chain, they were adding another thread in the race.

This patch removes these synthetic rules completely, and adds a much
simpler function to declare explicitly that a collection of tablegen'ed
files are referenced by other libraries. From that, we can add explicit
dependencies from the smaller libraries (such as every architectures
Desc library) on this and correctly form a linear sequence. All of the
backends are updated to use it, sometimes replacing the existing attempt
at adding a dependency, sometimes adding a previously missing dependency
edge.

Please let me know if this causes any problems, but it fixes a rather
persistent and problematic source of build flakiness on our end.

llvm-svn: 136023
2011-07-26 00:09:08 +00:00
Chandler Carruth e0e91c6d30 Check in updated CMake dependencies after Evan's latest round of
refactorings. Several places that shouldn't have dependend on Target no
longer do. Also almost all of the CodeGen dependencies have gone away
for the MCDisassembler. Others add reasonable dependencies within the
target-specific layers.

llvm-svn: 135977
2011-07-25 21:25:07 +00:00
Oscar Fuentes 4f0f335066 While building a LLVM target, put the current source directory on the
header search path.

llvm-svn: 135952
2011-07-25 20:17:01 +00:00
Oscar Fuentes a2e6274d33 CMake: generalize the system that creates custom targets for
tablegenning to all libraries and executables.

llvm-svn: 135908
2011-07-25 14:11:55 +00:00
Evan Cheng 8c886a40d2 Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.

llvm-svn: 135812
2011-07-22 21:58:54 +00:00
Chandler Carruth 43025a0869 Move TargetRegistry.cpp from lib/Support to lib/Target where it belongs.
The header file was already properly located. The previous need for it
in Support had to do with the version string printing which was fixed in
r135757.

Also update build dependencies where libraries that needed the
functionality of the Target library (in the form of the TargetRegistry)
were picking it up via Support. This is pretty pervasive, essentially
every TargetInfo library (ARMInfo, etc) uses TargetRegistry, making it
depend on Target. All of these were previously just sneaking by.

llvm-svn: 135760
2011-07-22 08:16:53 +00:00
Chandler Carruth 1108b1671c Update the CMake library dependencies. These shifts are the result of
Evan's recent refactorings (I believe). Specifically, MCDisassembler no
longer depends on Target, and ARMDisassembler no longer depends on
CodeGen. The added dependencies from ARMAsmParser to ARMDesc looks
correct based on header file inclusion.

llvm-svn: 135759
2011-07-22 08:05:47 +00:00
Evan Cheng 2129f59637 Introduce MCCodeGenInfo, which keeps information that can affect codegen
(including compilation, assembly). Move relocation model Reloc::Model from
TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine.

llvm-svn: 135468
2011-07-19 06:37:02 +00:00
Chandler Carruth 124342c467 The *MCAsmInfo.cpp files use ADT/Triple code, so add the Support dep.
llvm-svn: 135239
2011-07-15 02:34:03 +00:00
Chandler Carruth 9a0001aedb Major update to CMake build to reflect changes in r135219 in the
backend. Moved some MCAsmInfo files down into the MCTargetDesc
sublibraries, removed some (i suspect long) dead files from other parts
of the CMake build, etc. Also copied the include directory hack from the
Makefile.

Finally, updated the lib deps. I spot checked this, and think its
correct, but review appreciated there.

llvm-svn: 135234
2011-07-15 00:40:52 +00:00
Evan Cheng 1705ab00ab Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
llvm-svn: 135219
2011-07-14 23:50:31 +00:00
NAKAMURA Takumi 19ed0829a3 cmake/modules/LLVMLibDeps.cmake: Update since r135184.
llvm-svn: 135211
2011-07-14 23:12:02 +00:00
NAKAMURA Takumi 72a925540c cmake/modules/LLVMLibDeps.cmake: Update to appease cmake builds.
llvm-svn: 134696
2011-07-08 10:45:15 +00:00
Chandler Carruth 39572d3362 Fix CMake build's library dependencies.
llvm-svn: 134658
2011-07-07 23:45:45 +00:00
Oscar Fuentes 32a45e5aeb Update CMake library dependencies
llvm-svn: 134616
2011-07-07 16:33:00 +00:00
Oscar Fuentes 8ca6622e9a Update CMake library dependencies.
llvm-svn: 133859
2011-06-25 02:10:19 +00:00
Rafael Espindola 38c3c7f386 Fix cmake build.
llvm-svn: 133830
2011-06-24 22:01:28 +00:00
Dylan Noblesmith 5688b2b25b remove CMake mode_t define
It's now replaced with a simple ifdef _MSC_VER in the one
place it's needed (clang's FileManager.h header).

llvm-svn: 133711
2011-06-23 12:21:33 +00:00
Andrew Trick 67ff0718a4 lit support for REQUIRES: asserts.
Take #2. Don't piggyback on the existing config.build_mode. Instead,
define a new lit feature for each build feature we need (currently
just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define
this feature within test/lit.site.cfg. This doesn't require any lit
harness changes and should be more robust across build systems.

llvm-svn: 133664
2011-06-22 23:23:19 +00:00
Andrew Trick 48904e0cb7 Added LLVM_BUILD_MODE to cmake so that lit supports tests with REQUIRES: {buildmode}.
llvm-svn: 133205
2011-06-16 22:19:20 +00:00
Rafael Espindola 7e9ca2c095 Fix cmake dependencies.
llvm-svn: 131943
2011-05-24 00:58:06 +00:00
Rafael Espindola 5dfe17d242 Another try at fixing cmake.
llvm-svn: 131608
2011-05-19 00:13:04 +00:00
Rafael Espindola f1bda7c90c Revert my previous patch. The cmake build had already been fixed.
llvm-svn: 131606
2011-05-19 00:02:45 +00:00
Rafael Espindola efbdd80d77 Fix the cmake build.
llvm-svn: 131602
2011-05-18 23:56:40 +00:00
Oscar Fuentes ab84a7bf73 Handle gcc-compatible compilers (such as clang) the same way we handle
gcc.

Fixes PR9886.

llvm-svn: 131181
2011-05-11 13:53:08 +00:00
NAKAMURA Takumi 4471f82e91 Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries.
autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64.
cmake/config-ix.cmake: Add checking ELM_Callback decl for win32.

llvm-svn: 130657
2011-05-01 13:29:49 +00:00
Nick Lewycky 61aed87a49 Rename profile_rt.so to libprofile_rt.so under configure+make (it already was
under cmake).

Add libprofile_rt.a so that we can tell clang to link against it in --coverage
mode. Also turn it on by default in cmake builds.

Oscar, this touches a change you made for EXCLUDE_FROM_ALL support -- I think
I've done the right thing, but please let me know (or fix and commit) if not!

llvm-svn: 130470
2011-04-29 02:12:06 +00:00
Oscar Fuentes 638aaecc4d Honor LLVM_BUILD_RUNTIME.
llvm-svn: 130199
2011-04-26 14:55:27 +00:00
Francois Pichet 939efc5b0d Disable warning C4181: "qualifier applied to reference type; ignored"
This was causing a flooding of warnings with MSVC 2008. This warning was removed in MSVC 2010.

llvm-svn: 129737
2011-04-19 00:03:17 +00:00
Chris Lattner 0ab5e2cded Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Oscar Fuentes e2a114791c Export LLVM_TARGETS_WITH_JIT in LLVMConfig.cmake.in. Without this,
component names such as "engine" do not expand to "jit" and hence to
the native target libraries for external users.

Thanks to arrowdodger for reporting and diagnosing the problem.

llvm-svn: 129444
2011-04-13 15:25:31 +00:00
Oscar Fuentes c6f2d0a4cf CMake: remove some unnecesary code and ToDos.
Patch by arrowdodger!

llvm-svn: 129274
2011-04-11 14:52:39 +00:00
Oscar Fuentes dbe99ba37d CMake: support for using LLVM from client projects with find_package.
Patch by arrowdodger!

llvm-svn: 129247
2011-04-10 16:17:49 +00:00
Oscar Fuentes d8a6dd6c99 Rename LLVMConfig.cmake to LLVM-Config.cmake. The *Config.cmake naming
scheme is used by the functionality related to find_package.

llvm-svn: 128889
2011-04-05 17:02:48 +00:00
Oscar Fuentes 8b29cf50ed Fix typos on LLVM.cmake. Export LLVM_ON_UNIX & LLVM_ON_WIN32.
Patch by arrowdodger!

llvm-svn: 128789
2011-04-03 16:12:38 +00:00
Oscar Fuentes f2ab92833a Handle changing of LLVM_ENABLE_FFI.
If someone first configure build with LLVM_ENABLE_FFI=1 and then turn it
off, the build will fail in lib/ExecutionEngine/Interpreter because
Interpreter will try still to #include <ffi/ffi.h>, but there are no
include_directories(${FFI_INCLUDE_DIR}) now.

This patch unset()'s HAVE_FFI_H and HAVE_FFI_FFI_H from cache file if
LLVM_ENABLE_FFI=0. This forces CMake to update config.h.

Patch by arrowdodger!

llvm-svn: 128769
2011-04-02 13:21:12 +00:00
Oscar Fuentes cde00a55c8 Fix assignment of -fPIC to CMAKE_C_FLAGS. Configure llvm-config.in.in
with the contents of CMAKE_C(XX)_FLAGS too, else `llvm-config
--c(xx)flags' doesn't tell the absolute truth.

This comes from PR9603 and is based on a patch by Ryuta Suzuki!

llvm-svn: 128727
2011-04-01 19:36:06 +00:00