Commit Graph

660 Commits

Author SHA1 Message Date
Nick Lewycky
395af84652 Don't touch CXXFLAGS. If it's set in the environment then sub-makes will see
the variable that we set as though it came from the user. Fixes PR6835.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102239 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 04:56:34 +00:00
Dan Gohman
3072b8aa97 Enable -Wcast-qual for C++ files, where intentional qualifier-stripping can
be done with const_cast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101798 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 18:33:28 +00:00
Dan Gohman
dacd479173 Remove -module, which appears to be a leftover from prior libtool usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 18:11:02 +00:00
Dan Gohman
e05f609b61 Add an autoconf check for -retain-symbols-file and conditionalize
use of that option with it. This eliminates an imprecise "Linux"
test, and should help support old versions of gold.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 22:58:15 +00:00
Dan Gohman
7c52f2ee06 Make the export files absolute paths, and change Makefile.rules
to expect them this way, to fix srcdir!=objdir builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101414 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 23:08:00 +00:00
Dan Gohman
2d675f1308 Add a dependency on the .dir file to make sure that the directory
is created before the native exports file is built in a parallel build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101413 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 22:46:27 +00:00
Dan Gohman
b16b53b181 Generalize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work with
native linking export files, including running sed to prepend underscores
on darwin, and make use of it in libLTO and libEnhancedDisassembly.

Remove the leading underscores from library export files so that they
work with the new EXPORTED_SYMBOL_FILE support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 20:54:25 +00:00
Johnny Chen
b68a3ee82a Second try of initial ARM/Thumb disassembler check-in. It consists of a tablgen
backend (ARMDecoderEmitter) which emits the decoder functions for ARM and Thumb,
and the disassembler core which invokes the decoder function and builds up the
MCInst based on the decoded Opcode.

Reviewed by Chris Latter and Bob Wilson.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 22:27:38 +00:00
Jim Grosbach
e4ad0a3c18 remove arm mode workaround for ARM host
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98771 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 21:28:19 +00:00
Bob Wilson
49d9dc4dd2 --- Reverse-merging r98637 into '.':
U    test/CodeGen/ARM/tls2.ll
U    test/CodeGen/ARM/arm-negative-stride.ll
U    test/CodeGen/ARM/2009-10-30.ll
U    test/CodeGen/ARM/globals.ll
U    test/CodeGen/ARM/str_pre-2.ll
U    test/CodeGen/ARM/ldrd.ll
U    test/CodeGen/ARM/2009-10-27-double-align.ll
U    test/CodeGen/Thumb2/thumb2-strb.ll
U    test/CodeGen/Thumb2/ldr-str-imm12.ll
U    test/CodeGen/Thumb2/thumb2-strh.ll
U    test/CodeGen/Thumb2/thumb2-ldr.ll
U    test/CodeGen/Thumb2/thumb2-str_pre.ll
U    test/CodeGen/Thumb2/thumb2-str.ll
U    test/CodeGen/Thumb2/thumb2-ldrh.ll
U    utils/TableGen/TableGen.cpp
U    utils/TableGen/DisassemblerEmitter.cpp
D    utils/TableGen/RISCDisassemblerEmitter.h
D    utils/TableGen/RISCDisassemblerEmitter.cpp
U    Makefile.rules
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/Makefile
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
D    lib/Target/ARM/Disassembler
U    lib/Target/ARM/ARMInstrFormats.td
U    lib/Target/ARM/ARMAddressingModes.h
U    lib/Target/ARM/Thumb2ITBlockPass.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 16:59:47 +00:00
Johnny Chen
d30a98e43a Initial ARM/Thumb disassembler check-in. It consists of a tablgen backend
(RISCDisassemblerEmitter) which emits the decoder functions for ARM and Thumb,
and the disassembler core which invokes the decoder function and builds up the
MCInst based on the decoded Opcode.

Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm
instructions to help disassembly.

We also changed the output of the addressing modes to omit the '+' from the
assembler syntax #+/-<imm> or +/-<Rm>.  See, for example, A8.6.57/58/60.

And modified test cases to not expect '+' in +reg or #+num.  For example,

; CHECK:       ldr.w	r9, [r7, #28]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 16:36:54 +00:00
Chris Lattner
97d7b1007a add DESTDIR support for TOOLALIAS, for PR6557, patch by
Matthias Klose!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98193 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 21:27:53 +00:00
Erick Tryzelaar
d4076cfc83 Rewrite makefiles to explicitly reference DESTDIR to fix bug 3153.
We need this so can not bake DESTDIR into the O'Caml symlinks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97743 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 20:56:19 +00:00
Jeffrey Yasskin
c90171961d Try r96559 for the third time. This time the shared library is only built if
--enable-shared is passed to configure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 06:34:33 +00:00
Jeffrey Yasskin
407fbdd161 Roll back r96959 again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96981 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 20:53:37 +00:00
Jeffrey Yasskin
ea6c39d417 Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 of
the examples shared to make sure the shared library keeps working.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96959 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 18:10:07 +00:00
Daniel Dunbar
7cfbe2576d Switch .bc/.ll Makefile rules to use LLVM{CC,CXX} instead of LLVMG{CC,XX}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96936 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 10:28:06 +00:00
Daniel Dunbar
797faed186 Add LLVM{CC,CXX} make variables, which specify the configured path the LLVM
capable compilers (which could be llvm-gcc or clang).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 10:00:53 +00:00
Daniel Dunbar
112257d290 Eliminate CFERuntimeLibDir make variable, this shouldn't be needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96932 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 09:28:50 +00:00
Daniel Dunbar
a3f173237d Inline and eliminate LLVMG{CC,XX}WITHPATH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96913 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 07:56:41 +00:00
Daniel Dunbar
8d25ea2cf9 Remove dead LUPGRADE make variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96911 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 07:56:36 +00:00
Daniel Dunbar
99d9863cce Kill off LLVMGCC_MAJVERS make variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96907 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 07:56:22 +00:00
Jeffrey Yasskin
2155d459a7 Roll back the shared library, r96559. It broke two darwins and arm, mysteriously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96569 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 04:43:02 +00:00
Jeffrey Yasskin
f6afae2f49 Add a shared library for LLVM, named libLLVM2.7svn.(so|dylib), and add an
--enable-shared configure flag to have the tools linked shared. (2.7svn is just
$(LLVMVersion) so it'll change to "2.7" in the release.)  Always link the
example programs shared to test that the shared library keeps working.

On my mac laptop, Debug libLLVM2.7svn.dylib is 39MB, and opt (for example) is
16M static vs 440K shared.

Two things are less than ideal here:
1) The library doesn't include any version information. Since we expect to break
the ABI with every release, this shouldn't be much of a problem. If we do
release a compatible 2.7.1, we may be able to hack its library to work with
binaries compiled against 2.7.0, or we can just ask them to recompile. I'm
hoping to get a real packaging expert to look at this for the 2.8 release.
2) llvm-config doesn't yet have an option to print link options for the shared
library. I'll add this as a subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96559 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 02:36:02 +00:00
Sean Callanan
95fcebd5c4 Added a custom TableGen backend to support the
enhanced disassembler, and the necessary makefile
rules to build the table for X86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94764 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 00:21:04 +00:00
Chris Lattner
43b5f9312d make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:08 +00:00
Chris Lattner
c615038385 libs that need EH need RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:21:50 +00:00
Chris Lattner
c96d508184 ENABLE_EXPENSIVE_CHECKS shouldn't know how rtti is enabled, let REQUIRES_RTTI handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94375 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:20:40 +00:00
Daniel Dunbar
016f765289 make: Make .o files depend on Makefile, at least for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94184 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 18:10:54 +00:00
Anton Korobeynikov
2b02b43eb8 Provide magic define on mingw to not generate inline variants of ctyper functions.
Otherwise we'll end with random cyclic deps between libraries due to this.
Proposed by Gianluigi Tiesi!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 14:06:58 +00:00
Daniel Dunbar
f87ea4dd9a Add the rest of the build system logic for optional target disassemblers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 04:46:58 +00:00
Daniel Dunbar
fd96b13a94 Add TOOLALIAS makefile variable; this defines an alternate name for a program
which the makefiles will create by symlinking the actual tool to.
 - For use by clang, where we want to make 'clang++' and alias for clang (which
   enables C++ support in the driver)

 - Not sure this is the best approach, alternative suggestions welcome!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89282 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 00:14:53 +00:00
Daniel Dunbar
dee8dbed1e Add "Unoptimized" build (NO_DEBUG_SYMBOLS=1 ENABLE_OPTIMIZED=1), for reducing
disk space, and increasing battery lifetime. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88978 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 22:37:52 +00:00
Daniel Dunbar
1fce948ccb configure: Add --with-optimize-option, for setting the default value of
OPTIMIZE_OPTION.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 04:32:50 +00:00
Jim Grosbach
43301206b9 Build in ARM mode explicitly when on ARM Darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85615 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 21:33:05 +00:00
Nick Lewycky
0d20366a86 Indent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 03:22:00 +00:00
Jakob Stoklund Olesen
7b68ffcd2f Tablegen target intrinsics from the target main .td file.
Fix pasto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 18:48:47 +00:00
Edward O'Callaghan
df199f11c6 AuroraUX needs special Solaris system header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84076 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 05:55:03 +00:00
Mikhail Glushenkov
17d70ab4fe Raise the limit on built-in plugins in llvmc to 10.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 04:15:52 +00:00
Jakob Stoklund Olesen
52020782ad Remove trailing whitespace from build output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83284 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-04 17:54:36 +00:00
Jeffrey Yasskin
7fd82e56a8 Enable -g with DEBUG_SYMBOLS and --enable-debug-symbols instead of
DEBUG_RUNTIME.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82906 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 17:47:29 +00:00
Jeffrey Yasskin
d448292104 This patch causes the --enable-debug-runtime configure flag and the
DEBUG_RUNTIME Makefile variable to pass -g to gcc when building LLVM's objects.
Without this, it's very hard to debug crashes that happen in Release-Asserts
mode but not Debug mode.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82775 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 16:46:09 +00:00
Daniel Dunbar
3418579046 Add 'make check-all', which runs the LLVM tests along with the clang tests if
its in the standard location.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82374 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-20 06:17:21 +00:00
Daniel Dunbar
7f068f47a3 Build (not test) the unittests as part of a normal build.
- 'make unittests' still builds and tests.
 - 'make unitcheck' inside a unittest directory runs the tests in that directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81725 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 22:39:27 +00:00
Daniel Dunbar
1026c163c8 Revert unittests build changes temporarily, the unit test build isn't -j safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81692 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:58:14 +00:00
Daniel Dunbar
db0ce7d90f Build (not test) the unittests as part of a normal build.
- 'make unittests' still builds and tests.
 - 'make unitcheck' inside a unittest directory runs the tests in that directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:43:46 +00:00
Daniel Dunbar
ccb75c20c3 ... and fix the REQUIRES_RTTI condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 15:47:24 +00:00
Daniel Dunbar
d5b352b087 Fix REQUIRES_RTTI while awake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 15:45:13 +00:00
Daniel Dunbar
b33cc14561 Make REQUIRES_RTTI work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 15:39:39 +00:00
Evan Cheng
a5e225ec19 Do not specify -mmacosx-version-min if building for arm-apple-darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 18:52:20 +00:00
Dan Gohman
0e6a4daaeb llvm-as is no longer needed here, now that opt can read assembly
files directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81222 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 15:52:56 +00:00
Daniel Dunbar
70a3b77df8 Add 'lit' support for llvm tests.
- This adds 'make check-lit' from the top-level Makefile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:31:44 +00:00
Dan Gohman
c8b26880fd Remove some unnecessary -f options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 16:11:53 +00:00
Daniel Dunbar
aa60dbfb37 Filter out -fno-rtti from CXXFLAGS as well (in an expensive checks build).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 08:41:19 +00:00
Daniel Dunbar
e5f1b2f527 Fix creation of .bca libraries with EXPORTED_SYMBOLS_LIST, this was putting the
llvm-ld shell wrapper script in the archive, not the relinked object!

Also, rename the temp file to avoid conflicts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80373 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 16:14:46 +00:00
Nicolas Geoffray
8ed81416a7 Add a REQUIRES_FRAME_POINTER option to disable the frame pointer
elimination optimization on the LLVM code base.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79477 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:04:44 +00:00
Eric Christopher
2a80dc7814 Add CXXFLAGS to the Link lines as well in case someone used those instead
of LDFLAGS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 18:07:35 +00:00
Eric Christopher
2bd4bb0397 Separate out Makefile defines so that we can keep the llvm
defined ones from the user defined ones. Propagate accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79308 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 03:23:40 +00:00
Anton Korobeynikov
e55db74152 The attached patches attempt to fix cross builds. For example, if you
try to use i686-darwin to build for arm-eabi, you'll quickly run into
several false assumptions that the target OS must be the same as the
host OS. These patches split $(OS) into $(HOST_OS) and $(TARGET_OS) to
help builds like "make check" and the test-suite able to cross
compile. Along the way a target of *-unknown-eabi is defined as
"Freestanding" so that TARGET_OS checks have something to work with.

Patch by Sandeep Patel!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 00:40:33 +00:00
Misha Brukman
f547a12121 Fixed indentation and spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79245 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 15:31:24 +00:00
Anton Korobeynikov
7a677a3b54 Force reconfigure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79019 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:53:19 +00:00
Daniel Dunbar
25a619f735 Add temporary hack to teach LLVM to reconfigure itself to pick up the new PIC16
AsmPrinter (in AsmPrinters.def).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 17:22:49 +00:00
Anton Korobeynikov
0ab94a0077 Add executable suffix for the tool. This is needed e.g. for 'make install' on mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78185 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 09:37:43 +00:00
Daniel Dunbar
c464e51127 Makefile rules for generating assembly matcher.
- Unused, fear not cmakers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 18:35:35 +00:00
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