Commit Graph

5 Commits

Author SHA1 Message Date
Joerg Sonnenberger 17d7551e73 Revert part of r148839 and keep DefaultTargetTriple in the form adjusted
by -target and similar options. As discussed in PR 12026, the change
broke support for target-prefixed tools, i.e. calling x86_64--linux-ld
when compiling for x86_64--linux. Improve the test cases added
originally in r149083 to not require execution, just executable files.
Document the hack with appropiate FIXME comments.

llvm-svn: 151185
2012-02-22 19:15:16 +00:00
Chandler Carruth d7fa2e04f6 Revert r149083 which is not the direction we're going in the Clang
driver based on discussions with Doug Gregor. There are several issues:
1) The patch was not reviewed prior to commit and there were review comments.
2) The design of the functionality (triple-prefixed tool invocation)
   isn't the design we want for Clang going forward: it focuses on the
   "user triple" rather than on the "toolchain triple", and forces that
   bit of state into the API of every single toolchain instead of
   handling it automatically in the common base classes.
3) The tests provided are not stable. They fail on a few Linux variants
   (Gentoo among them) and on mingw32 and some other environments.

I *am* interested in the Clang driver being able to invoke
triple-prefixed tools, but we need to design that feature the right way.
This patch just extends the previous hack without fixing the underlying
problems with it. I'm working on a new design for this that I will mail
for review by tomorrow.

I am aware that this removes functionality that NetBSD relies on, but
this is ToT, not a release. This functionality hasn't been properly
designed, implemented, and tested yet. We can't "regress" until we get
something that really works, both with the immediate use cases and with
long term maintenance of the Clang driver.

For reference, the original commit log:
Keep track of the original target the user specified before
normalization. This used to be captured in DefaultTargetTriple and is
used for the (optional) $triple-$tool lookup for cross-compilation.
Do this properly by making it an attribute of the toolchain and use it
in combination with the computed triple as index for the toolchain
lookup.

llvm-svn: 149337
2012-01-31 02:21:20 +00:00
NAKAMURA Takumi e284cff24e test/Driver/prefixed-tools.c: Disable this on win32 hosts, msvc and mingw.
It had failed on Win32 due to inability of executing shell scripts.
Still it fails even with mingw MSYS bash.

llvm-svn: 149100
2012-01-27 00:31:09 +00:00
NAKAMURA Takumi e0f13f037c test/Driver/prefixed-tools.c: Fix newline at end-of-file.
llvm-svn: 149099
2012-01-27 00:31:03 +00:00
Joerg Sonnenberger 91960f4abb Keep track of the original target the user specified before
normalization. This used to be captured in DefaultTargetTriple and is
used for the (optional) $triple-$tool lookup for cross-compilation.
Do this properly by making it an attribute of the toolchain and use it
in combination with the computed triple as index for the toolchain
lookup.

llvm-svn: 149083
2012-01-26 21:56:28 +00:00