Commit Graph

121 Commits

Author SHA1 Message Date
Jeffrey Yasskin f750fefaf8 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.

llvm-svn: 96559
2010-02-18 02:36:02 +00:00
Daniel Dunbar e43fe7cbb7 For 'install-clang' target, also traverse tools/clang/lib/Runtime.
llvm-svn: 93958
2010-01-20 00:43:07 +00:00
Daniel Dunbar e4b5f9f54c Update install-clang target for clang-cc removal.
llvm-svn: 91226
2009-12-12 21:17:54 +00:00
Daniel Dunbar e8b8ccefcb Add the rest of the build system logic for optional target disassemblers
llvm-svn: 89841
2009-11-25 04:46:58 +00:00
Daniel Dunbar 1aab2ded3a Don't build examples by default, use BUILD_EXAMPLES=1 to build them. The only utility of this is testing that we keep the examples up to date, I will just make the buildbots run with this flag.
llvm-svn: 88979
2009-11-16 22:38:00 +00:00
Jim Grosbach 885fdd378a When cross-building, the CFLAGS and CXXFLAGS are for the target, and don't
apply to the build tools. If we want to allow build tool flags input, we
should have separate inputs (BUILD_CFLAGS and BUILD_CXXFLAGS, perhaps).

llvm-svn: 85607
2009-10-30 19:53:38 +00:00
Jim Grosbach b2dfe8b19a Remove extraneous comment line
llvm-svn: 85606
2009-10-30 19:52:05 +00:00
Jim Grosbach ad637e9564 update name check for Apple style builds to be more permissive
llvm-svn: 85605
2009-10-30 19:51:32 +00:00
Chandler Carruth 56869f22c4 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Chandler Carruth b49a3ee01e Remove stale reference to ThreadSupport.h.
llvm-svn: 85082
2009-10-25 23:41:56 +00:00
Stuart Hastings 8de31d0e80 Trying again to tweak the top-level Makefile to facilitate an Apple-style build.
Now with Clang-compatibility.

llvm-svn: 84872
2009-10-22 17:22:37 +00:00
Daniel Dunbar 074d8810cd Revert "Tweak top-level Makefile to facilitate Apple-style build.", this is
breaking Clang's Apple-style build.

llvm-svn: 84592
2009-10-20 02:23:13 +00:00
Stuart Hastings a19596bf64 Tweak top-level Makefile to facilitate Apple-style build.
llvm-svn: 84507
2009-10-19 17:53:54 +00:00
Mikhail Glushenkov 9fdea9e401 Reconfigure automatically when Base.td.in is changed.
Thanks to Chris for heads-up!

llvm-svn: 83613
2009-10-09 02:40:01 +00:00
Torok Edwin fd5438edee Speed up clang-only link, by really linking only clang, and not the unittests
too.

llvm-svn: 82873
2009-09-26 20:18:58 +00:00
Daniel Dunbar 96ccc47a13 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.

llvm-svn: 81725
2009-09-13 22:39:27 +00:00
Daniel Dunbar 63f5a77822 Revert unittests build changes temporarily, the unit test build isn't -j safe.
llvm-svn: 81692
2009-09-13 18:58:14 +00:00
Daniel Dunbar 37af2a9588 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.

llvm-svn: 81687
2009-09-13 18:43:46 +00:00
Shantonu Sen 96995e8179 Improve support for cross-hosted builds of LLVM.
--build=triple and other configure options are passed
to the BuildTools/ sub-invocation more consistently

llvm-svn: 80854
2009-09-02 23:52:23 +00:00
Gabor Greif 962c374781 re-apply r80197, now that iterator.h is not mentioned any more
llvm-svn: 80254
2009-08-27 17:07:35 +00:00
Bill Wendling c7d230f736 --- Reverse-merging r80147 into '.':
A    include/llvm/ADT/iterator.cmake
U    autoconf/configure.ac
--- Reverse-merging r80161 into '.':
U    cmake/config-ix.cmake
--- Reverse-merging r80171 into '.':
U    Makefile
--- Reverse-merging r80173 into '.':
U    configure
U    include/llvm/Config/config.h.in
--- Reverse-merging r80180 into '.':
A    include/llvm/ADT/iterator.h.in

Despite common miscomceptions, iterator.h is alive and well. It broke the build
bots for several hours. And yet no one bothered to look at them.

Gabor and Doug, please review your changes and make sure that they actually
build before resubmitting them.

llvm-svn: 80197
2009-08-27 03:29:26 +00:00
Gabor Greif a9ced1d3ae eliminate references to ADT/iterator.h
llvm-svn: 80171
2009-08-26 22:55:19 +00:00
Daniel Dunbar 0e04394d97 Build runtime libraries by default.
llvm-svn: 79465
2009-08-19 21:09:45 +00:00
Douglas Gregor 1b731d5dbe Introduce new headers whose inclusion forces linking and
initialization of all targets (InitializeAllTargets.h) or assembler
printers (InitializeAllAsmPrinters.h). This is a step toward the
elimination of relinked object files, so that we can build normal
archives.

llvm-svn: 73543
2009-06-16 20:12:29 +00:00
Chris Lattner 8bbd76b031 Change 'make install' to install tblgen, for better support of out-of-tree targets,
patch by Mikael Lepistö!

llvm-svn: 71226
2009-05-08 17:32:47 +00:00
Mike Stump 43a675bf8a Lets install the manual page with install-clang! Radar 6838692
llvm-svn: 70529
2009-05-01 01:47:55 +00:00
Gabor Greif 33e834cc0a Use a bigger hammer to coerce subversion into english.
Patch by Benjamin Kramer!

llvm-svn: 69976
2009-04-24 17:00:03 +00:00
Mike Stump 986991fd28 Remove ccc now. Radar 6737767
llvm-svn: 68544
2009-04-07 20:29:25 +00:00
Mike Stump 9d98cc6b93 Add ccc back for now.
llvm-svn: 68038
2009-03-30 17:43:04 +00:00
Mike Stump a0c86128ed Update to account for driver renaming.
llvm-svn: 67791
2009-03-26 23:43:14 +00:00
Nick Lewycky b2f34f6211 Remove configurey-fu to autodetect hash_map and hash_set now that they are
no longer used in LLVM.

llvm-svn: 66406
2009-03-09 06:16:26 +00:00
Mike Stump eb1e2006de Add targets to support the installation of clang in isolation.
llvm-svn: 62522
2009-01-19 19:48:23 +00:00
Misha Brukman 2879c29274 Removed trailing whitespace.
llvm-svn: 61904
2009-01-08 02:11:55 +00:00
Bill Wendling 8790e3260d Modify the unittests Makefiles so that they don't rebuild parts of LLVM just to
run the tests. Most of this was stolen from the llvm/test Makefiles.

llvm-svn: 61648
2009-01-04 23:12:21 +00:00
Misha Brukman bcf15388ab Original patch by Talin.
* Added the first LLVM unittest -- DenseMap.
* Updated mkpatch utility to include llvm/unittests dir
* Added top-level target "unittests" to run all unittests

llvm-svn: 61541
2009-01-01 02:24:48 +00:00
Anton Korobeynikov 8e58c52b37 Proper way of doing llvm canadian-cross compilation.
Patch by Jim Grosbach!

llvm-svn: 58981
2008-11-10 07:33:13 +00:00
Jim Grosbach 009db89513 Add support for Canadian Cross builds where the host executables are not
runnable on the build machine.

There are a few bits that need built for the build environment (TableGen).
This patch builds those bits, and the associated libraries, for the build
environment as well as the (usual) host environment.

Thanks to Eric C. and Devang P. for pre-commit review.

llvm-svn: 56975
2008-10-02 22:56:44 +00:00
Anton Korobeynikov cf3acae26e For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"
llvm-svn: 51687
2008-05-29 17:41:17 +00:00
Gabor Greif a6c5b38c4a a happier version of happiness
llvm-svn: 48663
2008-03-21 22:17:07 +00:00
Gabor Greif a6e293a389 Run 'svn info' in the C locale. Also appropriately escape spaces and ? for gawk in darwin.
llvm-svn: 47723
2008-02-28 18:46:56 +00:00
Gabor Greif 376d2cedb7 Simplify and clean up "update" target. Also
add an SVN-UPDATE-OPTIONS variable that controls
the update behaviour. This allows to go to a common
older revision of all svn directories:

  gmake update SVN-UPDATE-OPTIONS=-r47717

would rewind both llvm and clang to a common
revision (if clang is checked out into the llvm
tree).

llvm-svn: 47717
2008-02-28 14:58:14 +00:00
Gabor Greif d71b410cb8 Now that targets are serialized, introduce
two new convenience targets:

- update: svn update toplevel and try hard
          to locate updatable subdirectories
					using cunning tricks
- happiness: update then build and test

so what one wants to do now is:
  nice gmake --jobs happiness

Have fun!

llvm-svn: 47716
2008-02-28 13:06:50 +00:00
Gabor Greif 76e7083f49 Treat all targets serially at the toplevel. This allows
to specify
  nice gmake --jobs all check
and go to lunch, while a multiprocessor machine
will build everything using spare resources
and check the result thereafter.
Since concurrency of make is not restricted
in subdirectories, this should be a nearly
optimal way to do it.

Also teach the user about a configure switch.

llvm-svn: 47715
2008-02-28 11:48:14 +00:00
Chris Lattner 11cc8b3c14 remove attributions from the rest of the llvm makefiles.
llvm-svn: 45416
2007-12-29 20:11:13 +00:00
Nate Begeman 938d8cb8d9 Add install-libs target which only installs libraries, not tools
llvm-svn: 44979
2007-12-13 02:17:17 +00:00
Gordon Henriksen 37582f74cd Adding ocaml language bindings for the vmcore and bitwriter libraries. These are
built atop the C language bindings, and user programs can link with them as 
such:

  # Bytecode
  ocamlc -cc g++ llvm.cma llvmbitwriter.cma -o example example.ml
  # Native
  ocamlopt -cc g++ llvm.cmxa llvmbitwriter.cmxa -o example.opt example.ml

The vmcore.ml test exercises most/all of the APIs thus far bound. Unfortunately,
they're not yet numerous enough to write hello world. But:

  $ cat example.ml
  (* example.ml *)
  
  open Llvm
  open Llvm_bitwriter
  
  let _ =
    let filename = Sys.argv.(1) in
    let m = create_module filename in
    
    let v = make_int_constant i32_type 42 false in
    let g = define_global "hello_world" v m in
    
    if not (write_bitcode_file m filename) then exit 1;
    
    dispose_module m;

  $ ocamlc -cc g++ llvm.cma llvm_bitwriter.cma -o example example.ml
  File "example.ml", line 11, characters 6-7:
  Warning Y: unused variable g.
  $ ./example example.bc
  $ llvm-dis < example.bc
  ; ModuleID = '<stdin>'
  @hello_world = global i32 42            ; <i32*> [#uses=0]

The ocaml test cases provide effective tests for the C interfaces.

llvm-svn: 42093
2007-09-18 12:49:39 +00:00
David Greene b2e2be4b6d Get rid of annoying spaces.
llvm-svn: 39766
2007-07-11 23:44:08 +00:00
Reid Spencer 64a2622682 Install things needed by llvm-top to allow successful building
of llvm from that level.

llvm-svn: 38423
2007-07-08 03:50:22 +00:00
Reid Spencer 6d4a417df9 Echo command lines only if the user wants them.
llvm-svn: 36050
2007-04-15 06:22:48 +00:00
Reid Spencer a9482c8916 Add a new testing target: check-one. It is used like this:
make check-one TESTONE=test/path/to/test.ll

This runs a single check in exactly the same way that dejagnu runs it.

llvm-svn: 36049
2007-04-15 06:18:50 +00:00