Commit Graph

180 Commits

Author SHA1 Message Date
NAKAMURA Takumi
2fbf9e2fda Add version, arch, system libs, and targets to Makefile.config
Teach autoconf/configure.ac to AC_SUBST several additional values in
Makefile.config to make them available to Makefile code.  These will
be useful to generate CMake package modules from the Makefile build.

Contributed by Brad King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201052 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-09 16:36:42 +00:00
Eric Christopher
1baa38147a Add an autoconf option for turning on -gsplit-dwarf by default
when building llvm. This saves quite a bit of time and space when
linking. Please report any problems via bugzilla.

Caveats:

a) This will only work on linux
b) This requires a fairly new binutils
c) This requires a fairly new gdb

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184808 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 01:12:25 +00:00
Alexey Samsonov
ee03c949b8 Add basic zlib support to LLVM. This would allow to use compression/uncompression in selected LLVM tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180083 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 08:28:39 +00:00
Eric Christopher
c6aa834836 Turn anonymous type in anonymous union warning back on after cleaning up
issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177136 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-15 00:43:00 +00:00
Patrik Hagglund
6c440fcea5 Pass CPPFLAGS/CFLAGS/CXXFLAGS from the environment of configure to
Makefile.config.

This is implied at the bottom of the help text of configure (besides
CC/CXX/LDFLAGS, already passed to Makefile.config).

For backward compatibility, the values of CFLAGS and CXXFLAGS defaults
to empty, overriding the default values provided by autoconf (for
example, '-g -O2' when CC=gcc').

$(CPP) is not used by our makefiles. Therefore, the value of CPP is
not passed to Makefile.config, despite beeing mentioned by 'configure
--help'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174313 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 08:15:53 +00:00
Richard Smith
1983f54dae Add -Wno-nested-anon-types to -pedantic builds of LLVM. This Clang warning
catches uses of an extremely minor and widely-available C++ extension (which
every C++ compiler I could find supports, but EDG and Clang reject in strict
mode).

The diagnosed code pattern looks like this:

struct X {
  union {
    struct {
      int a;
      int b;
    } S;
  };
};


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174103 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 22:19:12 +00:00
Saleem Abdulrasool
11486ffd5a build: @ENABLE_THREADS@ => @LLVM_ENABLE_THREADS@
Makefile.config does not have the value for ENABLE_THREADS substituted as the
variable is called LLVM_ENABLE_THREADS within configure.ac.  This was pointed
out by zygoloid over IRC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174021 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 01:34:59 +00:00
Saleem Abdulrasool
3ef8b0adb4 build: add --with-python option
This adds a new --with-python option to allow configuration of the python binary
for building.  If not specified, $PATH will be searched for common python binary
names (python, python2, python3).  If specified, and the path is not executable,
it will attempt to search $PATH.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
Reviewed-by: Eric Christopher <echristo@gmail.com>, Daniel Dunbar <daniel@zuster.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173890 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 04:07:37 +00:00
Peter Collingbourne
fbb662f840 Introduce llvm::sys::getProcessTriple() function.
In r143502, we renamed getHostTriple() to getDefaultTargetTriple()
as part of work to allow the user to supply a different default
target triple at configure time.  This change also affected the JIT.
However, it is inappropriate to use the default target triple in the
JIT in most circumstances because this will not necessarily match
the current architecture used by the process, leading to illegal
instruction and other such errors at run time.

Introduce the getProcessTriple() function for use in the JIT and
its clients, and cause the JIT to use it.  On architectures with a
single bitness, the host and process triples are identical.  On other
architectures, the host triple represents the architecture of the
host CPU, while the process triple represents the architecture used
by the host CPU to interpret machine code within the current process.
For example, when executing 32-bit code on a 64-bit Linux machine,
the host triple may be 'x86_64-unknown-linux-gnu', while the process
triple may be 'i386-unknown-linux-gnu'.

This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple
platforms.

Differential Revision: http://llvm-reviews.chandlerc.com/D254

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172627 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 17:27:22 +00:00
David Greene
d2f8216ba4 Disable -Wuninitialized for gcc
If the compiler is gcc, disable variants of -Wuninitialized depending
on the gcc version.  This gets a lot of false positive warnings out of
the build.

Generate a new configure for the gcc -Wno-uninitialized fix.

Pick up -Wno-uninitialized from configure

Add the option -Wno[-maybe]-uninitialized as determined by configure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172006 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 22:11:13 +00:00
Roman Divacky
d14baf450b Add options to disable building of ARCMT, Rewriter and Static Analyzer
in clang. The default remains to build those.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170134 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-13 16:07:19 +00:00
Jordan Rose
92080529a0 Re-enable support for --program-prefix.
The Apple buildbots have been modified not to pass --target,
so they shouldn't choke on a default program prefix anymore.

Patch by Rick Foos!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164956 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-01 18:40:32 +00:00
Jordan Rose
85042e6585 Revert "Add --program-prefix support to build"
The Apple buildbots are set up to pass --target to configure for both
cross- and non-cross-compile builds, and the standard autoconf response
to this is to set the program prefix to '<target>-'. Until we can figure
out the proper way to handle this (don't pass --target? pass an explicit
--program-prefix=""? don't auto-populate program_prefix with target_alias?)
it's more important to keep the buildbots running.

This reverts r164633 / ba48ceb1a3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164651 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26 00:01:00 +00:00
Sebastian Pop
ba48ceb1a3 Add --program-prefix support to build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164633 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-25 21:15:08 +00:00
Eric Christopher
164a308b56 Temporarily revert this to bring back the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162722 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28 01:17:46 +00:00
Sebastian Pop
94a935f072 Add --program-prefix support to build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162707 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27 23:05:06 +00:00
Daniel Dunbar
8b5bee495f [configure] Add a --enable-keep-symbols configure flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161880 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14 18:14:20 +00:00
Eric Christopher
09a887345f Add a configure flag for enabling -Werror on the command line
while building as requested by Lang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161253 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 19:58:20 +00:00
Eric Christopher
46e6bcf3ac Add support for detecting libxml for Dmitri's work. He'll
commit code in clang that uses this shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161252 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 19:47:19 +00:00
Eric Christopher
8212002386 Add a configure option to pass -std=c++11 on the command line.
rdar://11366674

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161251 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 19:47:14 +00:00
Eric Christopher
42dffa50c5 Revert previous patch here, we should instead configure in specific
packages for particular uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161246 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 17:45:31 +00:00
Eric Christopher
cbd84f7d83 Add a BUILD_FLAGS variable so that autoconf checks have a place
to store additional flag options since too many things can
and do override CPPFLAGS. Also, this is exported, unlike CPPFLAGS
so it can be actually used elsewhere. This should enable us
to remove the AC_SUBSTs in the intel checks, but I have no way
of testing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161233 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 05:18:00 +00:00
Chandler Carruth
01e4a065ac Remove autoconf support for runtest and tclsh, some of the last vestigal
bits of DejaGNU.

Eric, you may want to remove the TCLSH bits from aclocal.m4 and
regenerate... I didn't want to touch the m4 file lest something
exploded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159308 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 23:53:41 +00:00
Danil Malyshev
bb8cef51df - Added ExecutionEngine/MCJIT tests
- Added HOST_ARCH to Makefile.config.in
The HOST_ARCH will be used by MCJIT tests filter, because MCJIT supported only x86 and ARM architectures now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157015 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-17 21:07:47 +00:00
Preston Gurd
7549354181 Make IntelJITEvents and OProfileJIT as optional libraries and add
optional library support to the llvm-build tool:
 - Add new command line parameter to llvm-build: “--enable-optional-libraries”
 - Add handing of new llvm-build library type “OptionalLibrary”
 - Update Cmake and automake build systems to pass correct flags to llvm-build
   based on configuration

Patch by Dan Malea!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156319 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-07 19:38:40 +00:00
Eli Bendersky
61b1851a20 Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM.
Also refactor the existing OProfile profiling code to reuse the same interfaces with the VTune profiling code.
In addition, unit tests for the profiling interfaces were added.

This patch was prepared by Andrew Kaylor and Daniel Malea, and reviewed in the llvm-commits list by Jim Grosbach



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152620 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-13 08:33:15 +00:00
Benjamin Kramer
8c3d2580cb configure: Don't require a perl interpreter to be present, LLVM's buildsystem doesn't depend on perl anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152234 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-07 17:07:20 +00:00
Rafael Espindola
9993a3aebb 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151665 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-28 23:32:06 +00:00
Chandler Carruth
3c2e5f2140 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151649 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-28 19:26:56 +00:00
Rafael Espindola
33177f591a Enable -Wcovered-switch-default as it matches the switch style used in llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151609 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-28 02:01:55 +00:00
Dylan Noblesmith
7fe0e03fb0 capitalize project name, reference bugzilla
And fix the double-[]. It was including the [] as part of
the project name somehow, resulting in PACKAGE_TARNAME "-llvm-"
and a strange docdir default:

./configure --help | grep docdir
  --docdir=DIR           documentation root [DATAROOTDIR/doc/-llvm-]



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146849 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-18 18:50:16 +00:00
Bob Wilson
ae7e2a4bbb Add an optional separate install prefix for internal components. rdar://10217046
Some files installed by clang are not relevant for general users and we'd like
to be able to install them to a different location.  This adds a new
--with-internal-prefix configure option and a corresponding PROJ_internal_prefix
makefile variable, which defaults to the standard prefix.  A tool makefile
can specify that it should be installed to this internal prefix by defining
INTERNAL_TOOL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145234 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-28 07:59:52 +00:00
Daniel Dunbar
a7de1d67b2 build/Make: Define a TARGET_NATIVE_ARCH variable to be a bit more precise than
ARCH, which gets tested in many more contexts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144434 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-12 00:18:02 +00:00
Eric Christopher
bee515f66b Add an option '--enable-libcpp' that will have the compiler pass on
options to use libc++ as the default c++ library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144413 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-11 22:51:42 +00:00
Charles Davis
13460c9bd6 Revert 142997. It doesn't work on Mac OS or the BSDs, which all use the BSD
version of the install program, which does not have the --strip-program
switch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143009 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-26 02:28:32 +00:00
Eric Christopher
f3a5ba548f Search for and use the strip program and pass it to install for it
to use for stripping final executables.

Patch by Simon Atanasyan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142997 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-26 00:52:13 +00:00
Daniel Dunbar
817cb964e2 build: Remove some unused code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142398 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-18 19:27:04 +00:00
NAKAMURA Takumi
e5ab51d51f autoconf: Introduce --with-clang-srcdir, to build out-of-tree clang as tools/clang on tools/Makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142102 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-16 02:54:26 +00:00
Daniel Dunbar
5d332f8b4a build: Remove some stray LLVMC configure variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141869 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-13 17:27:34 +00:00
Eric Christopher
73ec95296e Remove the rest of the compiler checking from the top level configure
script. Only the testsuite project needs to know this information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140220 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 00:53:42 +00:00
Daniel Dunbar
e2a91a76df build/configure: Add support for --with-extra-ld-options flag (to provide extra
options just to pass to ld).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133206 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-16 22:30:38 +00:00
NAKAMURA Takumi
8eac886216 autoconf: Add --disable-embed-stdcxx to suppress linking libstdc++.a into llvm.dll with --enable-shared on Cygming.
Cygwin has stdc++.dll in it's distribution, and we can assume distro's stdc++.dll might be available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122622 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-29 03:59:14 +00:00
Eric Christopher
031d30781a Use GZIPBIN instead of GZIP. Apparently gzip uses GZIP as an environment
variable for args you want to default pass to gzip.

Patch based on one by asau@inbox.ru.

Fixes PR8758.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 01:31:51 +00:00
Duncan Sands
1ac320ebb1 It seems inconsistent to have LLVMCC_EMITIR_FLAG and
LLVMGCC_DISABLEOPT_FLAGS, one with CC in it, the other
with GCC.  Rename LLVMGCC_DISABLEOPT_FLAGS to
LLVMCC_DISABLEOPT_FLAGS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120151 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-25 17:57:43 +00:00
Rafael Espindola
9d9ae9fb59 Add --enable-docs. Patch by NAKAMURA Takumi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118918 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 19:24:06 +00:00
Tobias Grosser
a84b567713 Detect if llvm-gcc is built on dragonegg.
Store the flags needed to disable optimizations and to emit LLVM-IR depending on
the version of llvm-gcc used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118684 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 16:31:34 +00:00
Tobias Grosser
baaadb2672 Add polly support to the build system.
Update the cmake and autoconf build system to compile polly
as a shared library if it is checked out into tools/polly. In case
polly is not checked out, nothing changes.
This models the way clang can be added to llvm if checked out to tools/clang.

Also rebuild configure.

Patch contributed by ether.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117755 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-30 00:54:26 +00:00
Chris Lattner
7cf8fc7a45 Make the makefiles go much faster by using the realpath
builtin instead of shell.  On my 8 core mac pro, this speeds
up a 'make -j8' null build of the lib directory from 1.11s to
0.77s wall time.

Patch by NAKAMURA Takumi!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110166 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 22:53:22 +00:00
Gabor Greif
6418cb3f4b typo in comment, regeneration not necessary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107774 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-07 13:58:46 +00:00
Dan Gohman
426b06d808 Delete unused variables (that weren't even getting expanded).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-01 17:26:14 +00:00