Commit Graph

546 Commits

Author SHA1 Message Date
Mikhail Glushenkov
2373c99433 Add --enable-llvmc-dynamic configure option.
Controls whether libCompilerDriver should be loaded dynamically. By default this
is needed only on Win32, to make dynamic plugins work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74759 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 03:52:47 +00:00
Mikhail Glushenkov
95c1f5ba64 Make dynamic LLVMC plugins work on Windows (finally!).
Implemented by making lib/CompilerDriver a shared library that holds all the
global static data (CommandLine options, plugin registry) that we unfortunately
have to live with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 03:09:15 +00:00
Mikhail Glushenkov
0a1cb1ea86 Remove duplication.
Factor out common preprocessor-related bits to Makefile.rules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 01:07:00 +00:00
Mikhail Glushenkov
d80d8690af Make llvmc work again.
Chris recently broke llvmc with his Makefile changes (r75379). That patch made
the global change .o -> .a, which caused built-in llvmc plugins to stop working
since plugin initialization in llvmc is based on static variables not referenced
from the main executable. This patch implements auto-generated forced references
to the plugin libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:46:48 +00:00
Duncan Sands
9ff4c13668 Since -Wno-long-long is ignored without -pedantic,
place it with -pedantic.  Remove -Wunused since it
is implied by -Wall.  Group -Wno-unused-parameter
with -Wall -W since it is the combination of these
two that turns on -Wunused-parameter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 12:40:30 +00:00
Chris Lattner
6be926647d Remove support for building LLVM libraries into "relinked"
object files.  Now we always build LLVM libraries into archives (.a files).

This makes the 'make' build work more like the cmake build, among other
things.  Doing this exposed some latent circular library dependencies, so
I think that llvm-config wasn't quite right for .o files anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 23:00:42 +00:00
Duncan Sands
f01a457026 On platforms like Sparc64 you need to pass -r to
gcc rather than directly to the linker: gcc will
then modify the linker options it generates (it
will not use --relax for example, incompatible
with -r, as it otherwise would).  This fixes the
sparc build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72943 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05 15:05:19 +00:00
Torok Edwin
2efc73d5d0 For the new ar --plugin libLLVMgold.so to work we need libLTO linked with
pthreads, otherwise ar complains of unresolved references to pthread_mutex_*.
LTO doesn't actually use pthreads, but ManagedStatic does.

Fix this by linking in LIBS (that contains pthreads) for LTO and gold.
For now this links in more libs than needed (libffi for example), we can figure
out later how to link in those libs per-tool later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-26 19:11:47 +00:00
Jay Foad
3b00162fa1 Work around the fact that GNU libstdc++'s debug mode uses RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71871 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-15 18:13:31 +00:00
Daniel Dunbar
e36b6d425f Allow client Makefiles control over whether they want -pedantic by
defining NO_PEDANTIC.
  - Pedantic C89 is a painful language...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 07:26:49 +00:00
Daniel Dunbar
fab3d68852 Refactor dependency generation for .ll files.
- This matches the normal dependency generation code.

 - This also fixes the problem that when building a normal and bitcode
   archive from the same source, the dependency files would overwrite
   one another. Which was bad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 06:35:50 +00:00
Daniel Dunbar
e2dc4e0639 Remove obsolete Makefile magic for calling llvm-upgrade
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 05:49:22 +00:00
Daniel Dunbar
d62031e719 Install bytecode libraries with a .bca suffix, otherwise it isn't
possible to build both a .a and a .bca.
 - My understanding is no one else is using this stuff, please let me
   know if I am wrong.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71539 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 05:35:40 +00:00
Mike Stump
3fbdbd9898 In non-pic builds, we can use -mdynamic-no-pic for a little more speed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-08 23:08:58 +00:00
Mike Stump
fe095f39e7 Restore minor deletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70892 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-04 18:40:41 +00:00
Mikhail Glushenkov
4558f481b8 Support --with-llvmgccdir and friends in llvmc, take 2.
Should now work when building with objdir != srcdir and when llvm-gcc is not
available.

Thanks to Duncan Sands for testing and advice!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21 19:46:10 +00:00
Evan Cheng
ea84e93a42 No, we are not avoiding -O3, just -fstrict-aliasing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20 22:49:59 +00:00
Evan Cheng
b306e38a2e One Mac OS X, just build with -O3 but without -fstrict-aliasing (which is kinda broken).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69630 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20 22:16:40 +00:00
David Greene
dbefd0c15b Add a --enable-profiling option to configure to build Debug+Profile and
Opt+Profile tools.  Now we can profile any kind of flavor we build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69351 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 14:49:22 +00:00
Chris Lattner
28fc9d898d move clang-specific makefile goop to clang makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69206 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 19:57:42 +00:00
Bill Wendling
6818985032 Don't install the libLLVMHello.dylib example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 18:48:38 +00:00
Bill Wendling
fa72236d29 Add compatibility_version and current_version flags when creating dylibs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 18:20:41 +00:00
Bill Wendling
29c0e3db62 Revert r68708. It was causing this failure in the self-hosting buildbot:
llvm[2]: Compiling lto.cpp for Debug build  (PIC)
make[2]: *** No rule to make target `/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Debug/lib/libLLVMBitWriter.a', needed by `/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/lib/libLTO.dylib'.  Stop.
make[1]: *** [all] Error 1
make: *** [all] Error 1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-09 18:26:57 +00:00
Misha Brukman
685cb17c98 Make sure to rebuild dependencies for the check' and unittests' targets so
we're not testing out-of-date code.  This also makes "make check" and
"make unittests" work out-of-the box right after the configure step, without
requiring the user to run "make tools-only" or "make libs-only".

Tested on Linux/x86_64 and Darwin/x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-09 14:57:00 +00:00
Mike Stump
1c33d02371 Avoid -O3 on Darwin for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68455 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-06 19:58:11 +00:00
Julien Lerouge
a6b37c09d3 Fix build on MacOS 10.4 systems (suggested by Mike Smith).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27 18:18:00 +00:00
Duncan Sands
74a057b41f Revert previous change in favour of an explanatory
comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67833 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27 11:35:00 +00:00
Duncan Sands
f89c269484 A Release-Asserts build makes it sound like assertions
are turned on, while in fact they are turned off.  Name
this Release-NoAsserts instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67831 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27 09:41:56 +00:00
Evan Cheng
a38ff646bc Missed this as part of r67451.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67500 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-23 03:45:56 +00:00
Bill Wendling
ad20d3825e Really should pass -dylib to the linker...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67469 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22 08:56:15 +00:00
Bill Wendling
aca5695223 A dylib should be built as a dylib and not a bundle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67468 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22 08:28:45 +00:00
Nick Lewycky
faf880fd5d Revert r67334 and r37349 which break "make check" on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67368 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 07:56:31 +00:00
Evan Cheng
817046e1f1 More makefile changes to allow dejagnu tests to pass when system tools default to a different target from the llvm configuration (e.g. 64-bit gcc and 32-bit llvm).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 20:27:23 +00:00
Sebastian Redl
8d8ba38f98 Fix Clang build for srcdir != objdir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67008 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-14 14:42:51 +00:00
Sebastian Redl
1119552a08 Add support for generating Clang diagnostic defs to Makefile.rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67006 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-14 11:59:18 +00:00
Daniel Dunbar
55a07b20cd Add ENABLE_COVERAGE, for building a +Coverage (gcov) configuration.
- Required some extra makefile tweaks to introduce a new flag var
   which only goes to compile/link tools but not the relink step,
   otherwise we get a copy of libgcov in the relinked .o files.

 - No configure magic for this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66945 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 20:59:41 +00:00
Scott Michel
87af5f0296 Darwin 10.4.x: "-rpath" is unnecessary when linking shared libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66825 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 21:03:53 +00:00
Bill Wendling
a0833356fe Revert r66765 and r66766. These were causing build failures on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66770 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 04:10:09 +00:00
Nick Lewycky
8bc080358f Set ARCH to x86 on mixed 32/64-bit Linux systems.
Remove the explicit if OS = Darwin test around the setting of -m32/-m64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 03:34:19 +00:00
Rafael Espindola
075630a158 Fix rebuilding after a .td file is modified. This was broken since revision
65834.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 17:58:54 +00:00
Chris Lattner
1b030a116d don't pass -Wl,-exported_symbol -Wl,_main to the linker when building on
Tiger.  PR3743


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66550 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 17:15:56 +00:00
Evan Cheng
c785b4f4a6 Re-apply 66315, but restrict it to Darwin only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66427 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 18:28:37 +00:00
Chris Lattner
086c788b39 Fix PR3743 - -mmacosx-version-min inappropriate for Mac OS X 10.4.11,
by stripping off any versions past the "10.4".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66392 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 04:45:03 +00:00
Nick Lewycky
34d7455ebc Revert r66315. Fix the build on mixed 64/32 Linux systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66350 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-07 22:17:05 +00:00
Evan Cheng
4b5051b0f9 If ARCH is x86_64, pass -m64 to the host compiler. -m32 for i386. This makes sure the JIT work correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-07 01:40:17 +00:00
Daniel Dunbar
3c89812109 Rename my makefile debugging rule to prevent accidental collisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 22:23:25 +00:00
Mikhail Glushenkov
533384eebd LINK_COMPONENTS should be added to LLVMLibsOptions.
From the code: "There are "Proj" libs (defined by the user's project) and "LLVM"
libs (defined by the LLVM project)." LINK_COMPONENTS are clearly defined by the
LLVM project.

Additionally, this fixes an issue with llvmc's build process:-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 10:03:27 +00:00
Nick Lewycky
1dace48f53 Switch to using -Wl,-R on Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 04:55:15 +00:00
Nick Lewycky
1c08c0e128 Fix build on Cygwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 03:36:50 +00:00
Mikhail Glushenkov
1386ae4b0f Remove duplication in Makefile.rules.
Merge common bits from the LLVMC and TABLEGEN sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:42:59 +00:00