Commit Graph

226 Commits

Author SHA1 Message Date
Peter Collingbourne
aa01400663 test: Make a start on a test suite for libLTO.
This works in a similar way to the gold plugin tests. We search for a compatible
linker on $PATH and use it to run tests against our just-built libLTO. To start
with, test the just added opt level functionality.

Differential Revision: http://reviews.llvm.org/D8472

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232785 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-19 23:55:38 +00:00
Zachary Turner
ca27e720c3 Attempt to fix the builders.
The issue was that the test Makefile had not been updated to
provide a value for HAVE_DIA_SDK, so it was being initialized
incorrectly.  Hopefully this brings everything back to green.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230162 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 07:01:41 +00:00
Chandler Carruth
15db81893f [gold] Consolidate the gold plugin options and actually search for
a gold binary explicitly. Substitute this binary into the tests rather
than just directly executing the 'ld' binary.

This should allow folks to inject a cross compiling gold binary, or in
my case to use a gold binary built and installed somewhere other than
/usr/bin/ld. It should also allow the tests to find 'ld.gold' so that
things work even if gold isn't the default on the system.

I've only stubbed out support in the makefile to preserve the existing
behavior with none of the fancy logic. If someone else wants to add
logic here, they're welcome to do so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229251 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 09:43:57 +00:00
Dimitry Andric
95c105ea45 Increase the CPU time timeout for testing from 10 to 20 minutes, to
compensate for slow machines, and the growing number of tests.

Prodded by:	Hans Wennborg


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229143 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 19:45:19 +00:00
Peter Zotov
91bf887d6d [lit] Make config.llvm_lib_dir available on cmake, too.
The OCaml tests require config.llvm_lib_dir to determine
the OCaml package search path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224978 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-30 03:24:11 +00:00
Hal Finkel
6fef94e4d4 OCAMLFLAGS can contain =, don't use = with sed
Like HOST_LDFLAGS, etc. OCAMLFLAGS can contain =, so use ! as the substitution
separator instead of = (otherwise, sed might error).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221879 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-13 09:29:30 +00:00
Peter Zotov
47f88b5bdf [OCaml] [autoconf] Migrate to ocamlfind.
This commit updates the OCaml bindings and tests to use ocamlfind.
The bindings are migrated in order to use ctypes, which are now
required for MCJIT-backed Llvm_executionengine.
The tests are migrated in order to use OUnit and to verify that
the distributed META.llvm allows to build working executables.

Every OCaml toolchain invocation is now chained through ocamlfind,
which (in theory) allows to cross-compile the OCaml bindings.

The configure script now checks for ctypes (>= 0.2.3) and
OUnit (>= 2). The code depending on these libraries will be added
later. The configure script does not check the package versions
in order to keep changes less invasive.

Additionally, OCaml bindings will now be automatically enabled
if ocamlfind is detected on the system, rather than ocamlc, as it
was before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220899 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30 08:29:45 +00:00
Peter Zotov
e3227ca292 [OCaml] Drop support for 3.12.1 and earlier.
In practice this means:
  * Always using -g flag.
  * Embedding -cclib -lstdc++ into the corresponding cma/cmxa file.
    This also moves -lstdc++ in a single place.
  * Using caml_named_value instead of a homegrown mechanism.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220843 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-29 08:15:54 +00:00
Peter Zotov
29773db30d [OCaml] PR5595: Pass LDFLAGS to tests via -cclib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220832 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-28 23:31:13 +00:00
Peter Zotov
b4d023aafe [OCaml] PR9719, PR14727: Make tests run without ocamlopt.
Previously, tests hardcoded ocamlopt and cmxa, which broke builds on
machines without ocamlopt. Instead, they now fall back to ocamlc.

As a side effect this fixes PR14727, which was caused by a crude hack
that replaced gcc with g++ everywhere in the ocamlopt native compiler
path and passes it back using -cc. Now the tests use the same
technique as META, i.e. -cclib -lstdc++. It might be more fragile
than using g++ explicitly, but it will break when the installed
package will also break, which is good.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220828 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-28 22:39:36 +00:00
Chandler Carruth
14e55b16df Teach lit to filter the host LDFLAGS down from the build system and into
the CGO build environment. This lets things like -rpath propagate down
to the C++ code that is built along side the Go bindings when testing
them.

Patch by Peter Collingbourne, and verified that it works by me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220252 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 00:36:28 +00:00
Peter Collingbourne
798ace2e58 Initial version of Go bindings.
This code is based on the existing LLVM Go bindings project hosted at:
https://github.com/go-llvm/llvm

Note that all contributors to the gollvm project have agreed to relicense
their changes under the LLVM license and submit them to the LLVM project.

Differential Revision: http://reviews.llvm.org/D5684

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219976 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-16 22:48:02 +00:00
Rafael Espindola
1c9caced63 Delete support for AuroraUX.
auroraux.org is not resolving.

I will add this to the release notes as soon as I figure out where to put the
3.6 release notes :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215645 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-14 15:15:09 +00:00
Benjamin Kramer
4551342b53 Fix (re-)creation of unittest lit.site.cfg for clang-tools-extra.
This has been hiding really well. Hopefully brings the builders suffering from
outdated lit.site.cfg files back to life.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215575 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-13 20:41:26 +00:00
Iain Sandoe
d276b15c52 lld test for configure & make
r210177 added lld Makefiles, r210245 added automatic build when the source is present.

This revision completes the set by adding the lld test and unittests to the check-all target.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210318 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06 09:06:25 +00:00
Rafael Espindola
fc6cc0edd6 With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202510 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 16:16:51 +00:00
Alp Toker
1214e71d77 Eliminate inappropriate use of FindProgramByName() from lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199835 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-22 21:52:35 +00:00
Peter Zotov
1ba15ab134 [OCaml] Dynamically link LLVM on --enable-shared builds
This commit significantly speeds up both bytecode and native
builds of LLVM clients (from ~20 second to sub-second link time),
and allows to invoke LLVM functions from OCaml toplevel.

The behavior for --disable-shared builds is unchanged.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194509 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12 20:55:49 +00:00
Peter Collingbourne
88fae0edcc Fix LTO handling of module-level assembly (PR14152).
Patch by Tom Roeder!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191042 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 22:15:52 +00:00
Daniel Dunbar
81e8f39858 [tests] Remove dead VALGRIND and CLEANED_TESTSUITE makefile variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188010 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 20:59:27 +00:00
Sebastian Pop
b02834cf1f add polly to check-all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182308 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-20 18:49:15 +00:00
Tim Northover
d66ad6c571 Allow host triple to be correctly overridden in CMake builds
The intended semantics mirror autoconf, where the user is able to
specify a host triple, but if it's left to the build system then
"config.guess" is invoked for the default.

This also renames the LLVM_HOSTTRIPLE define to LLVM_HOST_TRIPLE to
fit in with the style of the surrounding defines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181112 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04 07:36:23 +00:00
Alexey Samsonov
005159e924 Use zlib to uncompress debug sections in DWARF parser.
This makes llvm-dwarfdump and llvm-symbolizer understand
debug info sections compressed by ld.gold linker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180088 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 10:17:34 +00:00
Eric Christopher
0f3e48ecdb This appears to be no longer necessary for the testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179667 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-17 06:37:30 +00:00
Galina Kistanova
57ba122e76 Reverted r176374. In some cases the lit.site.cfg file does not get generated in tools/clang/tools/extra.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177751 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 18:54:14 +00:00
Patrik Hagglund
775a266415 In r169695, the address space limit for tests was replaced with a data
segment limit. Now, as a complement, add a stack space limit.

Otherwise, tests may grow undesirable large at inifinite
recursion. (Seen at r176838,
test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176862 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 12:38:10 +00:00
Edwin Vane
4385988d26 No need to force-create clang-tools-extra lit.site.cfg
The make (all) target takes care of creating lit configs and auto-generating
tests. The problem with the original 'lit.site.cfg' target is it's not
recursive and doesn't fully create everything necessary for testing
clang-tools-extra.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176374 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-01 19:58:58 +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
Benjamin Kramer
f81093a826 Drop the address space limit for tests in the makefile build.
The limit seems to break newer pythons (see PR13598) so just drop it for now.
Eventually lit should learn to set limits for its children instead of a global
limit in the makefile.

If some PPC bots fail after this change: That's a good thing, they actually run
clang tests now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169695 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-09 10:34:22 +00:00
Daniel Dunbar
b288ad8e36 test: Add a lit config variable to check if LTO is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166225 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18 20:43:11 +00:00
NAKAMURA Takumi
7c8998eaba Revert r117093, "test/Makefile: Force lit -j1 on Cygwin."
lit -jN works on cygwin in most cases, but still sometimes I can see stalls with iterative run on the buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165482 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09 05:07:18 +00:00
Nuno Lopes
c37290e578 yet another attempt at fixing @OCAMLOPT@ for sed.
Patch by Rick Foos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163380 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 09:24:13 +00:00
Nuno Lopes
ad5a0ce40b escape special char when handling CXX_FOR_OCAMLOPT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163098 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-02 15:16:51 +00:00
Chandler Carruth
f5ecf02d59 Teach the LLVM test makefile to run the extra Clang tools' test suites
as part of check-all.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161610 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-09 20:26:41 +00:00
Nuno Lopes
62ad748454 fix 'make check' when ocamlopt returns the compiler path with CFLAGS (and there's a cflag with a = char)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161114 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-01 15:50:34 +00:00
Chandler Carruth
96f41a1b0f Remove 'site.exp' building from both CMake and configure+make.
This is another vestige of the DejaGNU roots. There were FIXMEs in the
lit setup to add a 'lit.site.cfg', which has been around for quite some
time now, so I've properly switched the handling of the 4 things
actually used in site.exp to go through lit.site.cfg now. No more
parsing of the .exp file, one fewer configure-style generated file,
etc., etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159313 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28 00:16:51 +00:00
Chandler Carruth
2378aa7ad7 Remove the last vestiges of the '-lit' and '-dg' test runner split by
removing '-lit' qualifiers from make rules. I've left a legacy
'check-local-lit' rule in case build scripts have this encoded
somewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159311 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28 00:03:15 +00:00
Chandler Carruth
4760c4bae7 Rip out legacy DejaGNU support from our Makefiles. This hasn't been the
default in forever, and hasn't even worked since most of the .exp files
were removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159307 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 23:48:39 +00:00
Chandler Carruth
34b5db4d5f LLVM-GCC is dead. Really. I promise. ;]
More importantly, these files don't even have the variable that these
lines purport to substite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159304 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 23:34:25 +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
Daniel Dunbar
f468fd805a Revert r156393, "[tests] Remove some remaining DejaGNU related cruft.", this
patch wasn't ready yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156395 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08 18:26:07 +00:00
Daniel Dunbar
b3593a60ce [tests] Remove some remaining DejaGNU related cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156393 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08 18:11:49 +00:00
Bill Wendling
288967dfac Revert r153694. It was causing failures in the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153701 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-29 23:23:59 +00:00
Danil Malyshev
4b0b8ef1b0 Re-factored RuntimeDyld.
Added ExecutionEngine/MCJIT tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153694 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-29 21:46:18 +00:00
Chandler Carruth
3e29671cca Revert a series of commits to MCJIT to get the build working in CMake
(and hopefully on Windows). The bots have been down most of the day
because of this, and it's not clear to me what all will be required to
fix it.

The commits started with r153205, then r153207, r153208, and r153221.
The first commit seems to be the real culprit, but I couldn't revert
a smaller number of patches.

When resubmitting, r153207 and r153208 should be folded into r153205,
they were simple build fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153241 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-22 05:44:06 +00:00
Danil Malyshev
799184d8eb Re-factored RuntimeDyld.
Added ExecutionEngine/MCJIT tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153221 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-21 21:06:29 +00:00
Eli Bendersky
0f0c411079 Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed.
Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-16 06:28:33 +00:00
Daniel Dunbar
708276d6e4 build/make/test: Get rid of unused BUGPOINT_TOPTS variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144864 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-16 23:56:03 +00:00
Daniel Dunbar
dd4667f909 tests: Rip out a bunch of now unused test code relating to use of llvm-gcc in LLVM tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143143 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-27 20:59:26 +00:00