1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
Commit Graph

180 Commits

Author SHA1 Message Date
Meador Inge
c460735471 [configure/make] Propagate names of build host tools when making BuildTools
When cross-compiling LLVM itself the configure/make scripts get confused when
creating the needed build host tools.  For example, building and configuring
like:

  CC_FOR_BUILD='i686-pc-linux-gnu-gcc' CXX_FOR_BUILD='i686-pc-linux-gnu-g++'
  CXX='i686-mingw32-g++' CC='i686-mingw32-gcc' LD='i686-mingw32-ld' /scratch
  /meadori/llvm-trunk/src/trunk/configure --host=i686-mingw32

  CC_FOR_BUILD='i686-pc-linux-gnu-gcc' CXX_FOR_BUILD='i686-pc-linux-gnu-g++'
  CXX='i686-mingw32-g++' CC='i686-mingw32-gcc' LD='i686-mingw32-ld' make

causes the following build break:

  checking whether the C compiler works... configure: error: cannot run C
  compiled programs.
  If you meant to cross compile, use `--host'.
  See `config.log' for more details.

The 'config.log' shows that i686-mingw32-gcc is being used to create
executables for the build host.

This patch fixes the problem by propogating the names of the build host
tools via BUILD_* when configuring/making BuildTools.

Original patch by Ekaterina Sanina.

llvm-svn: 204760
2014-03-25 21:45:41 +00:00
NAKAMURA Takumi
1aa7442231 Provide CMake package modules in install tree
Teach the Makefile build system to generate and install CMake modules
LLVMConfig.cmake and LLVMConfigVersion.cmake so that applications that
build with CMake can use 'find_package(LLVM)' even when LLVM is not
built with CMake.  These modules tell such applications about available
LLVM libraries and their dependencies.

Run llvm-config to generate the list of libraries and use the results of
llvm-build to generate the library dependencies.  Use sed to perform
substitutions in the LLVMConfig.cmake.in and LLVMConfigVersion.cmake.in
sources that our CMake build system uses.

Teach the Makefile build system to generate the LLVMExports.cmake file
with content similar to that produced by the CMake install(EXPORT)
command.  Extend llvm-build with an option to generate the library
dependencies fragment for this file.

Contributed by Brad King.

llvm-svn: 201053
2014-02-09 16:37:02 +00:00
Bob Wilson
1c4aa146bc Fix bad variable syntax in r199413
llvm-svn: 199447
2014-01-17 00:40:39 +00:00
Bob Wilson
b4f554f78c Pass the --enable-libcpp configure option for cross builds, too.
<rdar://problem/15831288>

llvm-svn: 199413
2014-01-16 19:35:01 +00:00
NAKAMURA Takumi
d9388809f9 llvm-config: Fixup r197380, tweak for cross compilation. SYSTEM_LIBS should be --host's in BuildTools/llvm-config.
FIXME: Host's llvm-config is not generated. It's for target's.
Host tools, aka "BuildTools", in utils, do not require llvm-config to build.

For example with --host=i686-pc-mingw32 --build=linux,

  $ BuildTools/Release+Asserts/bin/llvm-config --libs support
  -lLLVMSupport
  -lpthread -lshell32 -lpsapi -limagehlp -lm

llvm-svn: 197382
2013-12-16 13:09:06 +00:00
Chandler Carruth
ee12d58370 Remove the very substantial, largely unmaintained legacy PGO
infrastructure.

This was essentially work toward PGO based on a design that had several
flaws, partially dating from a time when LLVM had a different
architecture, and with an effort to modernize it abandoned without being
completed. Since then, it has bitrotted for several years further. The
result is nearly unusable, and isn't helping any of the modern PGO
efforts. Instead, it is getting in the way, adding confusion about PGO
in LLVM and distracting everyone with maintenance on essentially dead
code. Removing it paves the way for modern efforts around PGO.

Among other effects, this removes the last of the runtime libraries from
LLVM. Those are being developed in the separate 'compiler-rt' project
now, with somewhat different licensing specifically more approriate for
runtimes.

llvm-svn: 191835
2013-10-02 15:42:23 +00:00
Craig Topper
785d969b01 Fix regular expression used by 'make update' to only look for 'I' and '?' at the start of svn info results and to check for spaces after 'I' instead of just after '?'.
Previously it was able to match 'I' anywhere in the filenames of the svn info results instead of just files that where ignored or unknown to svn. This would cause 'make update' to infinitely recurse if a file was modified with I anywhere in its name since svn info would return a Path pointing to the llvm root for those files.

llvm-svn: 185539
2013-07-03 14:48:37 +00:00
Edwin Vane
69f1a085e0 Improved svn repo searching for 'make update'
Use a simple recursive bash function to search for svn repos for the 'make
update' target thus including projects like clang-tools-extra.

Reviewers: bkramer, echristo
llvm-svn: 173650
2013-01-28 03:19:57 +00:00
Chandler Carruth
02c8db726c Update the root Makefile for VMCore -> IR. Missed by my original search
sadly, and is somewhat surprising in general.

llvm-svn: 171361
2013-01-02 09:27:25 +00:00
Argyrios Kyrtzidis
2e5029e3b8 [c-index-test] When building with BUILD_CLANG_ONLY=YES, include c-index-test.
It is part of libclang and has other uses besides running the clang tests.

llvm-svn: 167484
2012-11-06 19:54:46 +00:00
Bob Wilson
4c466eda90 Don't try to install c-index-test with BUILD_CLANG_ONLY. rdar://12492703
llvm-svn: 166637
2012-10-24 22:56:32 +00:00
Bill Wendling
e352463765 Remove dead variable.
llvm-svn: 165639
2012-10-10 18:20:49 +00:00
Bill Wendling
624d7752b9 Set the 'build clang only' flag when we're building only clang.
llvm-svn: 165042
2012-10-02 20:32:23 +00:00
Bob Wilson
f79469d5fc Clear UNIVERSAL_SDK_PATH setting when building host tools. <rdar://12360497>
I also moved the SDKROOT setting into the make flags, since clearing it from
the environment isn't good enough to override a setting on the make command
line.  That hasn't been a problem but it could be, and it's good to be
consistent with the way UNIVERSAL_SDK_PATH is handled.

llvm-svn: 164565
2012-09-24 22:51:19 +00:00
Daniel Dunbar
226105bdfd darwin/cross-build: Unset SDKROOT when building BuildTools.
llvm-svn: 162402
2012-08-22 22:01:01 +00:00
David Blaikie
b5970fe958 Fix the make update target to work even when sub repo repositories are ignored.
llvm-svn: 161883
2012-08-14 18:33:50 +00:00
Bob Wilson
9dd20d5063 Do not install llvm-config-host for cross-builds of clang. rdar://11317847
My previous change to install llvm-config-host for cross-builds resulted
in that file being installed even when the normal llvm-config was not
installed, e.g., when building the install-clang target.  Daniel suggested
this alternative, which solves the immediate problem and also avoids the gunk
in the top-level makefile.

llvm-svn: 156448
2012-05-09 00:07:02 +00:00
Bob Wilson
ce811552ae When cross compiling, install a host version of llvm-config. <rdar://11187889>
Now that llvm-config is a binary instead of a script the version installed
during a cross compiled build cannot be run from the host.  When cross
compiling, install a separate llvm-config-host that will run on the host.

llvm-svn: 155164
2012-04-19 23:19:55 +00:00
Dylan Noblesmith
3f8e863e7d Makefile: add missing files to FilesToConfig
And fix the comment about where the FilesToConfig variable
is.

llvm-svn: 148282
2012-01-17 02:56:49 +00:00
Daniel Dunbar
3c06b26f09 llvm-config: Replace with C++ version (was llvm-config-2).
- Another reapply of r144300, with hopefully one last fix.

llvm-svn: 145623
2011-12-01 20:18:09 +00:00
Duncan Sands
84beef543d Revert commit 145449 (ddunbar) since it is breaking the dragonegg buildbots.
Original commit message:
llvm-config: Replace with C++ version (was llvm-config-2).
 - Reapply of r144300, with lots of fixes/migration easement in between.

llvm-svn: 145582
2011-12-01 10:50:19 +00:00
Bob Wilson
e18f66ff91 Remove the install-clang-c makefile target.
When I did this before it broke a buildbot that was testing that target, but
we've removed that buildbot now.

llvm-svn: 145519
2011-11-30 21:06:12 +00:00
Daniel Dunbar
7dcd93d4fa llvm-config: Replace with C++ version (was llvm-config-2).
- Reapply of r144300, with lots of fixes/migration easement in between.

llvm-svn: 145449
2011-11-29 22:56:31 +00:00
Bob Wilson
9863091824 Partially revert r145157 to quiet an unhappy buildbot.
Removing that buildbot would be a better solution, but this is at least
a temporary workaround.

llvm-svn: 145160
2011-11-27 01:48:54 +00:00
Bob Wilson
9e01f60689 Merge the install-clang-c target into install-clang. <rdar://problem/10217046>
llvm-svn: 145157
2011-11-27 00:26:22 +00:00
Daniel Dunbar
49cee27d34 build/Make: Define a TARGET_NATIVE_ARCH variable to be a bit more precise than
ARCH, which gets tested in many more contexts.

llvm-svn: 144434
2011-11-12 00:18:02 +00:00
Daniel Dunbar
bd02be5f45 build/Make: Change llvm-config-2 to be compiled as a build tool.
llvm-svn: 144421
2011-11-11 22:59:49 +00:00
Daniel Dunbar
1f7c44f88e cross-build/Make: Update cross build to properly forward ARCH and
TARGETS_TO_BUILD variables to build tools submake, and also tweak echo command
to indicate when we are compiling/etc build tools.

llvm-svn: 144419
2011-11-11 22:59:45 +00:00
Eric Christopher
8dc004003a Add an option '--enable-libcpp' that will have the compiler pass on
options to use libc++ as the default c++ library.

llvm-svn: 144413
2011-11-11 22:51:42 +00:00
Daniel Dunbar
81117aed37 build/Make: Try to switch over to llvm-config-2 again, now that I've cleaned up
some more of the explicit dependencies. I'm staging things more slowly this time
in case there is more unanticipated fallout.

llvm-svn: 144323
2011-11-10 22:11:04 +00:00
Daniel Dunbar
745409c62f Revert r144300 "llvm-config: Replace with C++ version (was llvm-config-2).",
which didn't appear ready for prime time.

llvm-svn: 144309
2011-11-10 19:59:35 +00:00
Daniel Dunbar
e9f2479115 llvm-config: Replace with C++ version (was llvm-config-2).
llvm-svn: 144300
2011-11-10 18:49:59 +00:00
Daniel Dunbar
03dc3712f3 build/Make: Update for rename of show-diagnostics.
llvm-svn: 143564
2011-11-02 19:48:19 +00:00
David Blaikie
2145251624 Updating 'update' target to handle svn 1.7 'info' output. Patch by Jean-Danial Dupas!
llvm-svn: 142535
2011-10-19 18:35:30 +00:00
Peter Collingbourne
da02db0a55 Add clang-tblgen to OPTIONAL_DIRS when building native tools for the
cross build, so that a native version of clang-tblgen is available.
Should unbreak Clang cross build.

Also disable Polly for the native tool build, since it depends on
external libraries which may not be available, and it isn't required
anyway.

llvm-svn: 141454
2011-10-08 00:27:38 +00:00
Peter Collingbourne
01246536d9 Move TableGen's parser and entry point into a library
This is the first step towards splitting LLVM and Clang's tblgen executables.

llvm-svn: 140951
2011-10-01 16:41:13 +00:00
Eric Christopher
92ffa08e9a Remove llvmc and assorted build machinery for it.
The problems that llvmc solved have largely been subsumed with the
tasks that the clang driver can accomplish, but llvmc lacks flexibility
and depends too heavily on the EOL'd llvm-gcc.

llvm-svn: 140093
2011-09-19 23:22:41 +00:00
Bill Wendling
9d6c2c7a40 Install libprofile_rt.dylib where it's more available for gcov support.
<rdar://problem/9583891>

llvm-svn: 132860
2011-06-10 21:47:14 +00:00
Daniel Dunbar
a01ae2f598 build: Add support for a SHOW_DIAGNOSTICS build variable.
If enabled, this will attempt to use the CC_LOG_DIAGNOSTICS feature I dropped
into Clang to print a log of all the diagnostics generated during an individual
build (from the top-level). Not sure if this will actually be useful, but for
now it is handy for testing the option.

llvm-svn: 129312
2011-04-11 22:37:39 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Daniel Dunbar
e0e2ddaedc build/Makefiles: Don't build unittests when ONLY_TOOLS is set.
llvm-svn: 120196
2010-11-27 06:59:16 +00:00
Rafael Espindola
c2eb6da056 Add --enable-docs. Patch by NAKAMURA Takumi.
llvm-svn: 118918
2010-11-12 19:24:06 +00:00
Mikhail Glushenkov
10302168ea llvmc: remove dynamic plugins.
llvm-svn: 111094
2010-08-15 07:07:12 +00:00
Daniel Dunbar
574e92e907 tests: Kill off custom targets which were just there for TestRunner.sh.
llvm-svn: 110003
2010-08-02 00:52:44 +00:00
Bob Wilson
b209e3d8d2 Add support for a new Apple-style build target, EmbeddedSim, that builds
llvmCore for the iOS Simulator.

llvm-svn: 108922
2010-07-20 20:44:02 +00:00
Daniel Dunbar
bf6ad6f06f build/Clang: Build and install libLTO as part of clang-only/install-clang targets.
llvm-svn: 108493
2010-07-16 01:29:50 +00:00
Duncan Sands
bf3a1f45c3 Issue the warning about being slow whenever optimization is disabled,
and not just for Debug+Asserts builds.

llvm-svn: 107792
2010-07-07 16:48:16 +00:00
Gabor Greif
84c77d994d adapt condition for changed default build mode
who knows how to cover Asserts or Debug separately
please do not hesitate to extend this

llvm-svn: 107779
2010-07-07 14:37:04 +00:00
Duncan Sands
eb15d2084a Rename "Release" builds as "Release+Asserts"; rename "Release-Asserts"
builds to "Release".  The default build is unchanged (optimization on,
assertions on), however it is now called Release+Asserts.  The intent
is that future LLVM releases released via llvm.org will be Release builds
in the new sense, i.e. will have assertions disabled (currently they have
assertions enabled, for a more than 20% slowdown).  This will bring them
in line with MacOS releases, which ship with assertions disabled.  It also
means that "Release" now means the same things in make and cmake builds:
cmake already disables assertions for "Release" builds AFAICS.

llvm-svn: 107758
2010-07-07 07:48:00 +00:00
Daniel Dunbar
ca0b5f4232 build: Update install-clang target.
llvm-svn: 107334
2010-06-30 22:22:46 +00:00