Daniel Dunbar
38dd3d5418
Driver: Add Arg::getAsString and use when dumping arguments to
...
diagnostics.
- This ensures that the whole argument and values are printed,
instead of just the option name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 06:14:23 +00:00
Daniel Dunbar
ca3459e95f
Driver: Implement -print-search-dirs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 04:37:21 +00:00
Daniel Dunbar
b7b61b2686
Driver: Temporary hack to allow -ccc-print-bindings to work (for
...
testing) even with -pipe on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67348 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 00:11:04 +00:00
Daniel Dunbar
05494a78c3
Driver: Claim unused input arguments when emitting "input file unused"
...
diagnostic (to suppress more generic unused warning).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 07:57:08 +00:00
Daniel Dunbar
7587719c40
Driver: Claim -arch options when pipelining, and claim arguments that
...
are forwarded to GCC.
- The later is unfortunate, as it prevents us from generally warning
about anything interesting on platforms that use a generic
toolchain. However, we can't do much better without significantly
complicating things, and generally we should have proper tool chain
definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67293 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 07:55:12 +00:00
Daniel Dunbar
115a79277e
Driver: Handle "linker input" arguments.
...
- Make InputInfo a variant of filename, pipe, input argument,
nothing.
- Leave a FIXME in InputInfo that this should be revisited.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 07:29:38 +00:00
Daniel Dunbar
60ccc7677a
Driver: Forcibly disable pipe support until we can execute them, the
...
driver is functional without them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 23:18:19 +00:00
Daniel Dunbar
84603bc4ed
Driver: Delete the temporary files llvm::sys::Path::makeUnique
...
sometimes leaves around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 23:08:52 +00:00
Daniel Dunbar
e530ad407a
Driver: Cleanup temporary/result files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 22:16:03 +00:00
Daniel Dunbar
632f50edc0
Driver: Lookup program names using llvm::sys::Program::FindProgramByName
...
if our usual methods fail. This isn't necessary for running the tool,
but improves the accuracy of logging output.
Also, have GCC tools lookup gcc program path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 21:34:08 +00:00
Mike Stump
d227fe7ee0
The eventual name of this will be clang, might as well start now.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67241 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 21:19:11 +00:00
Daniel Dunbar
0edefebc10
Driver: Support ToolChain specific path lists to search for files and
...
programs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 20:26:19 +00:00
Daniel Dunbar
214399ebd7
Driver: Construct temporary file names.
...
- This is still suboptimal, but should at least be workable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67223 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 19:34:39 +00:00
Mike Stump
8944c38c2a
Add revision information.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67220 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 18:45:55 +00:00
Daniel Dunbar
af2e4baa2a
Driver: Don't warn about unused arguments if there are Driver errors
...
(brings code in line with diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67217 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 18:03:46 +00:00
Mike Stump
e70295b5c9
Fix URL trimming for version information.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67206 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 15:19:35 +00:00
Mike Stump
5d023c3ede
Improve version number.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67204 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 14:00:02 +00:00
Daniel Dunbar
56c5594515
Driver: Bug fix, derived .gch names sometimes started with "/".
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67192 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 09:58:30 +00:00
Daniel Dunbar
d09986a6fb
Driver: Add assert and FIXME; arguments which act as linker inputs
...
(e.g., -filelist) are currently broken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 08:02:40 +00:00
Daniel Dunbar
871adcf4e4
Driver: ConstructJob also needs to know the destination (where to put
...
its commands).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 07:06:02 +00:00
Daniel Dunbar
aa469f62f2
Driver: Print version on stderr to match [gc]cc.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67178 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 06:51:03 +00:00
Daniel Dunbar
5ab483b2c8
Driver: Claim inputs when we bind the InputAction.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 06:21:12 +00:00
Daniel Dunbar
028801c66f
Driver: Don't claim inputs when pipelining, a tool should eventually
...
claim these.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67171 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 06:09:38 +00:00
Daniel Dunbar
62cf601812
Driver: Add a dash of const.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 06:07:59 +00:00
Daniel Dunbar
47ac7d27c4
Driver: Stub out Tool::ConstructJob.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67169 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 06:00:36 +00:00
Daniel Dunbar
c811b6c5e3
Driver: Add two normalizations for powerpc.
...
- PR3830
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 04:41:46 +00:00
Daniel Dunbar
10ffa9a488
Driver: Ditch Driver::DefaultToolChain, this can vary between compilations.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 03:13:20 +00:00
Daniel Dunbar
21549237f1
Driver: Move actions into Compilation, and construct the compilation
...
earlier.
- This gives us a simple ownership model, and allows clients access
to more information should they ever want it.
- We now free Actions correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 02:55:38 +00:00
Daniel Dunbar
5796bf4913
Driver: Add test for binding of precompile; exposed bug due to my
...
flawed idea that llvm::sys::Path::getBasename was a version of
basename().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 02:00:31 +00:00
Daniel Dunbar
8f25c79e59
Driver: Use PrettyStackTrace.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67149 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 01:38:48 +00:00
Daniel Dunbar
7e4534d9c1
Driver: Release Host, ToolChain, and Tool implementations.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 01:09:40 +00:00
Daniel Dunbar
5c3c1d7b49
Driver: Add -ccc-print-bindings option (for testing); the Python
...
driver has no corresponding option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67125 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 22:47:06 +00:00
Daniel Dunbar
baf07759bc
Driver: Make sure to get the default arch name from the tool chain, not the
...
host; the toolchain may differ based on command line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 21:29:52 +00:00
Daniel Dunbar
e504952bc8
Driver: Pass Driver reference down into Host info, which will need it
...
to pass to ToolChains, which may need Driver specific information (for
example, to form search paths).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 20:45:45 +00:00
Daniel Dunbar
1fd6c4b8ab
Driver: Hide HostInfo implementations.
...
- Also, normalize arch names a tad and stub out getToolChain
implementations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67091 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 19:00:50 +00:00
Daniel Dunbar
441d060838
Driver: Add logic for computing where to put job outputs (pipe,
...
temporary file, user provided name, derived name).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67088 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 17:53:55 +00:00
Daniel Dunbar
70c168488b
Fix unused variable warning in -Asserts mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 04:12:06 +00:00
Daniel Dunbar
f353c8cc2e
Driver: Implement majority tool binding logic.
...
- Still need code for determining proper output location.
- Doesn't work yet, of course, as the host isn't providing real
tool chains.
- Interface still has a few warts, but has gotten a nice bit of
polish during the rewrite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67038 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-16 06:56:51 +00:00
Daniel Dunbar
586dc233bb
Driver: Migrate some data into the Compilation; after pipelining
...
access to most data should go through the current Compilation, not the
Driver (which shouldn't be specialized on variables for a single
compilation).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-16 06:42:30 +00:00
Daniel Dunbar
2ba38ba9a1
Driver: Sketch Tool and ToolChain classes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-16 05:25:36 +00:00
Daniel Dunbar
411f2e42f5
Driver: claim input arguments when building phases.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67016 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-15 01:40:22 +00:00
Daniel Dunbar
8d2554a2c3
Driver: Start warning about unused arguments.
...
- This has a number of current flaws, enabling now to flush out
problems while bringing up other parts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-15 01:38:15 +00:00
Daniel Dunbar
8022fd46d4
Driver: Update ArgList::{hasArg,getLastArg} to optionally claim the
...
arguments if they exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-15 00:48:16 +00:00
Daniel Dunbar
57b704d8d8
Driver: Sprinkle some consts in, stub out BuildJobs method.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66968 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 22:12:33 +00:00
Daniel Dunbar
1368954db9
Driver: For universal builds, handle archs in the order they were seen.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 20:33:35 +00:00
Daniel Dunbar
83dd21f6b4
Driver: Fix '-x none' handling.
...
- Enough stuff works now we can test argument parsing & pipelining.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 17:57:10 +00:00
Daniel Dunbar
3dbd6c51bc
Driver: Some minor bug fixes.
...
- language recognition was recognizing prefixes incorrectly.
- -x none wasn't working.
- test for "can lipo" was backwords.
- missed a '"' in -ccc-print-phases
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66911 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 17:46:02 +00:00
Daniel Dunbar
ab835430b4
Driver: Return 0 from BuildCompilation on -ccc-print-phases,
...
-ccc-print-options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66907 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 17:24:34 +00:00
Daniel Dunbar
b269c32596
Driver: Print -ccc-print-phases on stderr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66906 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 17:20:20 +00:00
Daniel Dunbar
a88162c1b3
Driver: Fix thinko in Darwin host identification.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66889 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 12:23:29 +00:00