Daniel Dunbar
1b52d8c4ec
Unbreak -ccc-cxx and -ccc-clang-cxx defaulting.
...
llvm-svn: 90629
2009-12-05 00:13:59 +00:00
Daniel Dunbar
acd6957b59
Driver: Switch -ccc-* options to using the standard options functionality.
...
- I still want to get rid of them, but manually handling them isn't adding value.
llvm-svn: 90602
2009-12-04 21:55:23 +00:00
Daniel Dunbar
65b9952c2e
Add OptTable::PrintHelp.
...
llvm-svn: 90420
2009-12-03 07:01:38 +00:00
Daniel Dunbar
44b36ee78c
What the FIXMEs want, the FIXMEs shall have.
...
llvm-svn: 89861
2009-11-25 11:53:23 +00:00
Daniel Dunbar
52ed5feee5
Factor out OptTable::ParseArgs, for parsing an entire argument vector.
...
llvm-svn: 89327
2009-11-19 06:35:06 +00:00
Daniel Dunbar
da13faf982
Driver: ArgList doesn't depend on Options.h anymore.
...
llvm-svn: 89313
2009-11-19 04:25:22 +00:00
Daniel Dunbar
fffd18167d
Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead of taking a Claim argument.
...
- Most driver code always claims, and bool arguments don't play nice with the overloads.
llvm-svn: 89308
2009-11-19 04:00:53 +00:00
Daniel Dunbar
0bfb21e4b0
Use Option::matches instead of direct ID comparison.
...
llvm-svn: 89305
2009-11-19 03:26:40 +00:00
Daniel Dunbar
aa767378ac
Driver: Split OptTable out into OptTable.{h,cpp}
...
llvm-svn: 89283
2009-11-19 00:15:11 +00:00
Daniel Dunbar
26228a0d7a
Driver: Rework OptTable to have no dependency on the options it manages.
...
llvm-svn: 89234
2009-11-18 20:19:36 +00:00
Mike Stump
727170d2d8
Allow customization for the version line.
...
llvm-svn: 83652
2009-10-09 17:31:54 +00:00
Douglas Gregor
1b7035da6f
Provide a common set of routines in Version.h that return Subversion
...
branch/revision information. Use that information in the driver,
rather than one-off branch/revision computation.
llvm-svn: 83321
2009-10-05 20:33:49 +00:00
Daniel Dunbar
5564ba743f
Push "clang-is-production" logic up to tools/driver, and make it hittable by
...
defining the CLANG_IS_PRODUCTION Makefile variable.
llvm-svn: 82583
2009-09-22 22:31:13 +00:00
Daniel Dunbar
07806ca7ab
Improve driver error message when only running the preprocessor and an input is
...
already preprocessed.
--
ddunbar@giles:tmp$ touch t.i
ddunbar@giles:tmp$ gcc -E t.i
ddunbar@giles:tmp$ clang -E t.i
clang: warning: t.i: previously preprocessed input unused when '-E' is present
ddunbar@giles:tmp$
--
<rdar://problem/6813375> [driver] driver prints confusing message when running -E on preprocessed file
llvm-svn: 82120
2009-09-17 04:13:26 +00:00
Daniel Dunbar
1ce81538f1
Change Get{File,Program}Path to return an std::string (instead of a sys::Path).
...
llvm-svn: 81389
2009-09-09 22:33:00 +00:00
Daniel Dunbar
b5d86bbd76
Push bound architecture name into Compilation::getArgsForToolChain.
...
llvm-svn: 81365
2009-09-09 18:36:01 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Daniel Dunbar
9c3f7c4a4b
Validate arguments to -arch.
...
llvm-svn: 81281
2009-09-08 23:37:30 +00:00
Daniel Dunbar
1ef3f2aa3a
Rename HostInfo::getToolChain to HostInfo::CreateToolChain, and don't recreate
...
the default tool chain when binding the default architecture.
llvm-svn: 81279
2009-09-08 23:37:19 +00:00
Daniel Dunbar
7b57404dea
Simplify.
...
llvm-svn: 81277
2009-09-08 23:37:02 +00:00
Daniel Dunbar
953b8d1f15
Fix ShouldUseClangCompiler to use llvm::Triple.
...
- -1 FIXME, and fixes 'clang -arch armv4t ...', for example.
llvm-svn: 81276
2009-09-08 23:36:55 +00:00
Daniel Dunbar
f26a7ab377
Tweak & reflow comments, and delete trailing whitespace.
...
llvm-svn: 81275
2009-09-08 23:36:43 +00:00
Daniel Dunbar
5ed07fe794
Add -ccc-install-dir option for faking installation path.
...
llvm-svn: 81017
2009-09-04 18:35:03 +00:00
Mike Stump
850cc1c5a4
Update.
...
llvm-svn: 80864
2009-09-03 01:30:36 +00:00
Daniel Dunbar
6cdf83c192
Add driver support for -emit-ast and AST compilation steps.
...
- <rdar://problem/7185031> Add 'clang' option '-emit-ast'
llvm-svn: 80678
2009-09-01 16:57:46 +00:00
Daniel Dunbar
516bb9dd76
Remove arch normalization from Driver, this should be unnecessary now that
...
things have moved to llvm::Triple.
llvm-svn: 79902
2009-08-24 09:16:49 +00:00
Chris Lattner
3441b4f77e
API changes to match llvm ToT.
...
llvm-svn: 79868
2009-08-23 22:45:33 +00:00
Daniel Dunbar
ccc60da5c7
Reenable clang using clang-cc for C++ and all archs by default.
...
llvm-svn: 79861
2009-08-23 19:41:53 +00:00
Daniel Dunbar
b5bcd6b94a
Temporarily switch clang back to not using clang-cc by default for C++, and only
...
using clang-cc on i386 and x86_64.
llvm-svn: 79859
2009-08-23 18:42:54 +00:00
Edward O'Callaghan
856e4ff78d
Second half of, clang, AuroraUX toolchain support.
...
llvm-svn: 79713
2009-08-22 01:06:46 +00:00
Daniel Dunbar
07b749230c
Switch the driver back to always using clang-cc by default (for C++, and
...
regardless of the architecture).
- This is a good default for development & testing; for example without this
any tests using 'clang' in the test suite will fail on PowerPC, since the
driver will avoid using clang.
- We don't want to actually ship something built this way, but that should be
handled via some sort of configuration file.
llvm-svn: 76886
2009-07-23 17:48:59 +00:00
Daniel Dunbar
08e41d65a2
driver: Print --version on stdout, to match gcc.
...
- Patch by Jean-Daniel Dupas
llvm-svn: 76632
2009-07-21 20:06:58 +00:00
Daniel Dunbar
38bfda6ab5
Driver: Move Compilation::Execute to Driver::ExecuteCompilation.
...
- The Compilation is just a helper class, it shouldn't have that amount of
logic in it.
- No functionality change.
llvm-svn: 74634
2009-07-01 20:03:04 +00:00
Daniel Dunbar
10de9e6602
OpenBSD support.
...
- Patch by Jonathan Gray!
llvm-svn: 74453
2009-06-29 20:52:51 +00:00
Daniel Dunbar
10978e414c
Stub out printing of the thread model with -v.
...
- Turns out libstdcxx greps for this in configure.
llvm-svn: 73582
2009-06-16 23:32:58 +00:00
Daniel Dunbar
1b3ec3a000
Fake support for -print-multi-*
...
- I think we will eventually need to support this for realz, and some build
processes seem to depend on these options.
llvm-svn: 73581
2009-06-16 23:25:22 +00:00
Eli Friedman
5cd659fd32
Fix for PR4140: Add the start of a Linux toolchain (basically, just
...
barely enough to get the given usage of -print-file-name working).
llvm-svn: 72412
2009-05-26 07:52:18 +00:00
Daniel Dunbar
51c7f97bea
(llvm up) Use llvm::Triple for storing target triples.
...
- This commit has some messy stuff in it to extend string lifetimes, but that
will go away once we switch to using the enum'd Triple interfaces.
llvm-svn: 72243
2009-05-22 02:53:45 +00:00
Daniel Dunbar
82b22101e6
Reformat a comment
...
llvm-svn: 72046
2009-05-18 21:47:54 +00:00
Daniel Dunbar
5e051f9a86
Add --analyze-auto.
...
- Currently just an alias for --analyze, eventually we want to refit
--analyze so that it is less automatic (i.e., does not force plist
output and does not hard code the list of checks).
llvm-svn: 71056
2009-05-06 02:12:32 +00:00
Daniel Dunbar
cc9123424f
DragonFly ToolChain definition for driver.
...
- Patch by Alex Hornung!
llvm-svn: 70635
2009-05-02 18:28:39 +00:00
Douglas Gregor
e5f93b1e58
Revert r70424. We don't need it
...
llvm-svn: 70432
2009-04-29 23:06:13 +00:00
Douglas Gregor
424ac21318
Add PCH version to the -v output
...
llvm-svn: 70424
2009-04-29 22:47:43 +00:00
Douglas Gregor
272842aa1c
Enable PCH by default
...
llvm-svn: 70339
2009-04-28 22:44:02 +00:00
Douglas Gregor
7b71e63120
Add a header containing the Clang version; make the driver use this
...
Clang version value rather than hard-coding "1.0".
Add PCH and Clang version information into the PCH file. Reject PCH
files with the wrong version information.
llvm-svn: 70264
2009-04-27 22:23:34 +00:00
Douglas Gregor
060eaf6520
Turn PCH off by default, yet again. I'm happier about it this time, though
...
llvm-svn: 70168
2009-04-26 23:15:05 +00:00
Douglas Gregor
56930a4b81
Trying turning on PCH by default yet again. We might actually a chance at success now
...
llvm-svn: 70164
2009-04-26 22:21:26 +00:00
Douglas Gregor
8bdbf3628f
Turn off PCH by default, again
...
llvm-svn: 70113
2009-04-26 05:09:50 +00:00
Douglas Gregor
5b21e96c56
One more crazy try with PCH-by-default
...
llvm-svn: 70112
2009-04-26 03:59:49 +00:00
Douglas Gregor
58d23997c8
Turn of PCH by default. I got the info I was looking for
...
llvm-svn: 70106
2009-04-26 01:34:47 +00:00
Douglas Gregor
06ccf7a463
Another shot at switching PCH on by default, now that we've cleaned up some bugs and improved performance. Will be reverted after Mr. Speedy gets done with it
...
llvm-svn: 70099
2009-04-26 00:37:38 +00:00
Douglas Gregor
25d85bcada
Revert my PCH change. I'm happy now
...
llvm-svn: 70018
2009-04-25 07:18:06 +00:00
Douglas Gregor
9e17c07741
Temporarily try to build with PCH by default. Revert this change once
...
we see what trouble it causes.
llvm-svn: 70017
2009-04-25 06:28:32 +00:00
Daniel Dunbar
712e4dee26
Look at the TMP environment variable as well.
...
llvm-svn: 69638
2009-04-21 00:25:10 +00:00
Daniel Dunbar
c35694da21
Also look at the TEMP environment variable as a place to put temporary
...
files.
llvm-svn: 69622
2009-04-20 20:28:21 +00:00
Daniel Dunbar
ab8ce7cddb
If defined, use TMPDIR environment variable as location for temporary files.
...
llvm-svn: 69609
2009-04-20 17:32:49 +00:00
Douglas Gregor
111af7d7b4
Preliminary PCH support in the driver
...
llvm-svn: 69410
2009-04-18 00:34:01 +00:00
Daniel Dunbar
f2df7c283f
Driver: Allow using clang as a precompiler, even if it is an
...
unsupported arch.
llvm-svn: 69322
2009-04-16 23:10:13 +00:00
Daniel Dunbar
a7b5e219bb
Driver: Add --help-hidden
...
llvm-svn: 69171
2009-04-15 16:34:29 +00:00
Daniel Dunbar
8b723e299c
Driver: CCC_ADD_ARGS could end up using dangling pointers.
...
llvm-svn: 68805
2009-04-10 18:32:59 +00:00
Daniel Dunbar
a3cfbe33da
Driver: Add 'q' flag for options which shouldn't be reported as unused.
...
- <rdar://problem/6756295> warning about '-dynamic' argument unused
during compilation seems incorrect
llvm-svn: 68535
2009-04-07 19:04:18 +00:00
Daniel Dunbar
a9bbcfa130
Driver: Handle -dumpversion, this is used by some configuration
...
scripts.
llvm-svn: 68418
2009-04-04 05:17:38 +00:00
Daniel Dunbar
90dd6f45cc
Driver: Automatically suppress warnings for duplicate versions of
...
flags which were used for something.
llvm-svn: 68416
2009-04-04 00:52:26 +00:00
Daniel Dunbar
f69985511d
Driver: Add -Qunused-arguments option to suppress driver "unused
...
arguments" warning.
llvm-svn: 68410
2009-04-03 22:09:23 +00:00
Daniel Dunbar
b0006ae76d
Wire --version to normal -v version text.
...
llvm-svn: 68316
2009-04-02 15:05:41 +00:00
Daniel Dunbar
7803c9546b
Driver: Allow -ccc-gcc-name to specify the name/path to use when
...
calling gcc in generic configurations.
llvm-svn: 68260
2009-04-01 23:34:41 +00:00
Daniel Dunbar
0a05d93ed6
Quick and dirty (!) fix to make sure we use powerpc in triples.
...
- PR3922
- I have a clean solution for this in flight, but it may take a while
to come to fruition so we'll take a quick fix for now.
llvm-svn: 68241
2009-04-01 20:33:11 +00:00
Daniel Dunbar
7c92528530
Driver: Implement basic --help text.
...
- PR3875.
- <rdar://problem/6615249> [driver] ccc should support some form of
--help
llvm-svn: 68148
2009-03-31 21:38:17 +00:00
Daniel Dunbar
e24297c6b5
Driver: Sketch FreeBSD tool chain.
...
- Patch by Ed Schouten!
llvm-svn: 68061
2009-03-30 21:06:03 +00:00
Daniel Dunbar
d67a32252c
Driver: Support -M and -MM.
...
- Not particularly elegant, but my hand is forced by gcc.
Also, tweak -ccc-print-bindings output.
llvm-svn: 68027
2009-03-30 06:36:42 +00:00
Daniel Dunbar
58399aecc1
Driver: Make sure to claim -### before emitting "unused argument"
...
warnings.
llvm-svn: 68018
2009-03-29 22:24:54 +00:00
Daniel Dunbar
565eefd4ab
Driver: -print-libgcc-file-name was searching wrong path list.
...
llvm-svn: 67837
2009-03-27 14:26:33 +00:00
Mike Stump
db65737b1c
Fix searching for gcc, we only want executable files.
...
llvm-svn: 67806
2009-03-27 00:40:20 +00:00
Daniel Dunbar
dd76524d76
Driver: Fix a number of option definition mismatches (flags instead of
...
separate, or vice versa).
Also, fix initialization of LinkingOutput variable.
llvm-svn: 67757
2009-03-26 16:12:09 +00:00
Daniel Dunbar
b1024880f1
Driver: Print the correct target when printing the version.
...
llvm-svn: 67756
2009-03-26 16:09:13 +00:00
Daniel Dunbar
c7fd57a2f3
Driver: Move GetReleaseVersion to static Driver::GetReleaseVersion method.
...
llvm-svn: 67754
2009-03-26 15:58:36 +00:00
Chris Lattner
ada1c91537
hopefully fix VC++ build error.
...
llvm-svn: 67741
2009-03-26 05:56:24 +00:00
Daniel Dunbar
dac54a81df
Driver: Prep for tool chain specific argument translation.
...
- Lift ArgList to a base class for InputArgList and DerivedArgList.
- This is not a great decomposition, but it does embed the
translation into the type system, and keep things efficient for
tool chains that don't want to do any translation.
- No intended functionality change.
Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).
llvm-svn: 67676
2009-03-25 04:13:45 +00:00
Daniel Dunbar
1386495406
Driver: Handle -flto, -O4, and tweak -emit-llvm to match llvm-gcc.
...
- -emit-llvm no longer changes what compilation steps are done.
- -emit-llvm and -emit-llvm -S write output files with .o and .s
suffixes, respectively.
- <rdar://problem/6714125> clang-driver should support -O4 and -flto,
like llvm-gcc
llvm-svn: 67645
2009-03-24 20:17:30 +00:00
Daniel Dunbar
6b5244d600
Driver: Warn when 'clang' is used to compile a source file we could
...
conceivably handle, but are defaulting to not using clang for.
llvm-svn: 67641
2009-03-24 19:14:56 +00:00
Daniel Dunbar
88f356e16b
Driver: Change default use of "clang" compiler.
...
- Don't default to using clang for C++ (use -ccc-clang-cxx to
override).
- Default to only using clang on i386 and x86_64 (use
-ccc-clang-archs "" to override).
- <rdar://problem/6712350> [driver] clang should not be used on
powerpc by default
- <rdar://problem/6705767> driver should default to -ccc-no-clang-cxx
I plan to add a warning that we are not using the clang compiler for
the given compilation so that users do not think clang is being used
in situations it isn't.
This change is motivated by the desire to be able to drop clang into a
build and have things "just work", even if it happens to get used to
compile C++ code or code for an architecture we don't support yet.
llvm-svn: 67640
2009-03-24 19:02:31 +00:00
Daniel Dunbar
8fa879d39f
Move ToolChain::ShouldUseClangCompiler to
...
Driver::ShouldUseClangCompiler.
- No functionality change.
llvm-svn: 67639
2009-03-24 18:57:02 +00:00
Daniel Dunbar
76ce7416ae
Driver: Setup file and program search paths in tool chains.
...
llvm-svn: 67529
2009-03-23 16:15:50 +00:00
Daniel Dunbar
d8500f3b0f
Driver: Implement 'missing argument' error.
...
llvm-svn: 67490
2009-03-22 23:26:43 +00:00
Daniel Dunbar
ea9f032613
ccc/Driver: .s defaults to 'assembler-with-cpp' on Darwin.
...
- <rdar://problem/6669441> ccc doesn't handle assembler-with-cpp
semantics correctly (but clang supports it)
- This is sad, because it requires a fairly useless target
hook. C'est la vie.
llvm-svn: 67418
2009-03-20 23:39:23 +00:00
Daniel Dunbar
0e75994e8b
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.
llvm-svn: 67366
2009-03-20 06:14:23 +00:00
Daniel Dunbar
d972e2247b
Driver: Implement -print-search-dirs.
...
llvm-svn: 67362
2009-03-20 04:37:21 +00:00
Daniel Dunbar
1fc898c40a
Driver: Temporary hack to allow -ccc-print-bindings to work (for
...
testing) even with -pipe on.
llvm-svn: 67348
2009-03-20 00:11:04 +00:00
Daniel Dunbar
adc5c7c2fd
Driver: Claim unused input arguments when emitting "input file unused"
...
diagnostic (to suppress more generic unused warning).
llvm-svn: 67294
2009-03-19 07:57:08 +00:00
Daniel Dunbar
2da027244d
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.
llvm-svn: 67293
2009-03-19 07:55:12 +00:00
Daniel Dunbar
5cdf3e0fb9
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.
llvm-svn: 67292
2009-03-19 07:29:38 +00:00
Daniel Dunbar
c4acf9d516
Driver: Forcibly disable pipe support until we can execute them, the
...
driver is functional without them.
llvm-svn: 67254
2009-03-18 23:18:19 +00:00
Daniel Dunbar
18d69de523
Driver: Delete the temporary files llvm::sys::Path::makeUnique
...
sometimes leaves around.
llvm-svn: 67253
2009-03-18 23:08:52 +00:00
Daniel Dunbar
6c17bfd99b
Driver: Cleanup temporary/result files.
...
llvm-svn: 67248
2009-03-18 22:16:03 +00:00
Daniel Dunbar
6f66877ebf
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.
llvm-svn: 67243
2009-03-18 21:34:08 +00:00
Mike Stump
fc17674d6b
The eventual name of this will be clang, might as well start now.
...
llvm-svn: 67241
2009-03-18 21:19:11 +00:00
Daniel Dunbar
68b01a03ba
Driver: Support ToolChain specific path lists to search for files and
...
programs.
llvm-svn: 67229
2009-03-18 20:26:19 +00:00
Daniel Dunbar
e627c1cc0f
Driver: Construct temporary file names.
...
- This is still suboptimal, but should at least be workable.
llvm-svn: 67223
2009-03-18 19:34:39 +00:00
Mike Stump
1dca7c0061
Add revision information.
...
llvm-svn: 67220
2009-03-18 18:45:55 +00:00
Daniel Dunbar
d175d9753b
Driver: Don't warn about unused arguments if there are Driver errors
...
(brings code in line with diagnostic.
llvm-svn: 67217
2009-03-18 18:03:46 +00:00
Mike Stump
3b79d59be7
Fix URL trimming for version information.
...
llvm-svn: 67206
2009-03-18 15:19:35 +00:00
Mike Stump
02537142c1
Improve version number.
...
llvm-svn: 67204
2009-03-18 14:00:02 +00:00
Daniel Dunbar
e6c8319943
Driver: Bug fix, derived .gch names sometimes started with "/".
...
llvm-svn: 67192
2009-03-18 09:58:30 +00:00
Daniel Dunbar
dcd05482bd
Driver: Add assert and FIXME; arguments which act as linker inputs
...
(e.g., -filelist) are currently broken.
llvm-svn: 67183
2009-03-18 08:02:40 +00:00
Daniel Dunbar
04c4c2c3db
Driver: ConstructJob also needs to know the destination (where to put
...
its commands).
llvm-svn: 67179
2009-03-18 07:06:02 +00:00
Daniel Dunbar
3beceaf7f1
Driver: Print version on stderr to match [gc]cc.
...
llvm-svn: 67178
2009-03-18 06:51:03 +00:00
Daniel Dunbar
2b4bda8073
Driver: Claim inputs when we bind the InputAction.
...
llvm-svn: 67174
2009-03-18 06:21:12 +00:00
Daniel Dunbar
bcd775b436
Driver: Don't claim inputs when pipelining, a tool should eventually
...
claim these.
llvm-svn: 67171
2009-03-18 06:09:38 +00:00
Daniel Dunbar
0450e6dc4c
Driver: Add a dash of const.
...
llvm-svn: 67170
2009-03-18 06:07:59 +00:00
Daniel Dunbar
1a093d2049
Driver: Stub out Tool::ConstructJob.
...
llvm-svn: 67169
2009-03-18 06:00:36 +00:00
Daniel Dunbar
1197adcbf1
Driver: Add two normalizations for powerpc.
...
- PR3830
llvm-svn: 67166
2009-03-18 04:41:46 +00:00
Daniel Dunbar
eb843bedf9
Driver: Ditch Driver::DefaultToolChain, this can vary between compilations.
...
llvm-svn: 67162
2009-03-18 03:13:20 +00:00
Daniel Dunbar
f0eddb8510
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.
llvm-svn: 67158
2009-03-18 02:55:38 +00:00
Daniel Dunbar
d00978bc0d
Driver: Add test for binding of precompile; exposed bug due to my
...
flawed idea that llvm::sys::Path::getBasename was a version of
basename().
llvm-svn: 67153
2009-03-18 02:00:31 +00:00
Daniel Dunbar
2608c548b5
Driver: Use PrettyStackTrace.
...
llvm-svn: 67149
2009-03-18 01:38:48 +00:00
Daniel Dunbar
0160172228
Driver: Release Host, ToolChain, and Tool implementations.
...
llvm-svn: 67146
2009-03-18 01:09:40 +00:00
Daniel Dunbar
b39cc52eda
Driver: Add -ccc-print-bindings option (for testing); the Python
...
driver has no corresponding option.
llvm-svn: 67125
2009-03-17 22:47:06 +00:00
Daniel Dunbar
71bdee6ea1
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.
llvm-svn: 67106
2009-03-17 21:29:52 +00:00
Daniel Dunbar
52e0c70868
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).
llvm-svn: 67102
2009-03-17 20:45:45 +00:00
Daniel Dunbar
b42a26c0a5
Driver: Hide HostInfo implementations.
...
- Also, normalize arch names a tad and stub out getToolChain
implementations.
llvm-svn: 67091
2009-03-17 19:00:50 +00:00
Daniel Dunbar
7a178a40a1
Driver: Add logic for computing where to put job outputs (pipe,
...
temporary file, user provided name, derived name).
llvm-svn: 67088
2009-03-17 17:53:55 +00:00
Daniel Dunbar
6865a9e975
Fix unused variable warning in -Asserts mode.
...
llvm-svn: 67073
2009-03-17 04:12:06 +00:00
Daniel Dunbar
e75d834c7c
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.
llvm-svn: 67038
2009-03-16 06:56:51 +00:00
Daniel Dunbar
3ce436d229
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).
llvm-svn: 67037
2009-03-16 06:42:30 +00:00
Daniel Dunbar
9e2136d930
Driver: Sketch Tool and ToolChain classes.
...
llvm-svn: 67036
2009-03-16 05:25:36 +00:00
Daniel Dunbar
02ae54c549
Driver: claim input arguments when building phases.
...
llvm-svn: 67016
2009-03-15 01:40:22 +00:00
Daniel Dunbar
adc91e6597
Driver: Start warning about unused arguments.
...
- This has a number of current flaws, enabling now to flush out
problems while bringing up other parts.
llvm-svn: 67015
2009-03-15 01:38:15 +00:00
Daniel Dunbar
ae0e55eb7f
Driver: Update ArgList::{hasArg,getLastArg} to optionally claim the
...
arguments if they exist.
llvm-svn: 67014
2009-03-15 00:48:16 +00:00
Daniel Dunbar
95e6b191cb
Driver: Sprinkle some consts in, stub out BuildJobs method.
...
llvm-svn: 66968
2009-03-13 22:12:33 +00:00
Daniel Dunbar
e5dc48233f
Driver: For universal builds, handle archs in the order they were seen.
...
llvm-svn: 66939
2009-03-13 20:33:35 +00:00
Daniel Dunbar
c5a5ac5015
Driver: Fix '-x none' handling.
...
- Enough stuff works now we can test argument parsing & pipelining.
llvm-svn: 66913
2009-03-13 17:57:10 +00:00
Daniel Dunbar
e2ca3bddde
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
llvm-svn: 66911
2009-03-13 17:46:02 +00:00
Daniel Dunbar
3efedddcf9
Driver: Return 0 from BuildCompilation on -ccc-print-phases,
...
-ccc-print-options.
llvm-svn: 66907
2009-03-13 17:24:34 +00:00
Daniel Dunbar
ed50f6c356
Driver: Print -ccc-print-phases on stderr.
...
llvm-svn: 66906
2009-03-13 17:20:20 +00:00
Daniel Dunbar
0a180f1499
Driver: Fix thinko in Darwin host identification.
...
llvm-svn: 66889
2009-03-13 12:23:29 +00:00
Daniel Dunbar
aaf1ea6386
Driver: Support -ccc-print-phases.
...
llvm-svn: 66888
2009-03-13 12:19:02 +00:00
Daniel Dunbar
6522933d7a
Driver: Complete "pipelining" (building the list of abstract actions
...
to perform). Still doesn't do anything interesting.
- This code came out much cleaner than in ccc with the reworked
phases & mapping of types to lists of compilation steps (phases) to
perform.
llvm-svn: 66885
2009-03-13 11:38:42 +00:00
Daniel Dunbar
0f35a026a9
Driver: Ignore empty arguments.
...
llvm-svn: 66858
2009-03-13 01:01:44 +00:00
Daniel Dunbar
5e0f6af190
Driver: Handle "immediate" options.
...
Also, add some FIXMEs, improve doxygen & comments.
llvm-svn: 66857
2009-03-13 00:51:18 +00:00
Daniel Dunbar
34c4187152
ccc/Driver: Mark {dump{machine,specs,version},
...
print-{multi-{directory,lib,os-directory}, search-dirs} as unsupported
instead of handling separately.
llvm-svn: 66848
2009-03-13 00:17:48 +00:00
Daniel Dunbar
bfeec7443f
Driver: Determine which compilation stages to run.
...
llvm-svn: 66844
2009-03-12 23:55:14 +00:00
Daniel Dunbar
f479c1293e
Driver: Add majority of driver-driver implementation.
...
- Compare to driverdriver.c if bored; not completely fair since the
driver gets a bit more code in other places to handle binding archs
(for Xarch) but not completely unfair either.
Fear not, extra Action classes will have a happy home for their
vtables soon.
llvm-svn: 66817
2009-03-12 18:40:18 +00:00
Daniel Dunbar
446f684332
Driver: Introduce ActionList typedef, tweak some constness.
...
llvm-svn: 66809
2009-03-12 18:24:49 +00:00
Daniel Dunbar
5cd1e419b7
Driver: Tweak diag names to be more consistent.
...
llvm-svn: 66787
2009-03-12 09:13:48 +00:00
Daniel Dunbar
c0b3e95a1a
Driver: Use standard Diagnostic interface for diagnostics.
...
llvm-svn: 66786
2009-03-12 08:55:43 +00:00
Daniel Dunbar
1688f1a7e0
Driver: Start sketching construction of abstract built actions.
...
llvm-svn: 66783
2009-03-12 07:58:46 +00:00
Daniel Dunbar
4dff6a4973
Driver: Add host info.
...
- Replace assorted -ccc-host-* options by -ccc-host-triple which is
more sane.
llvm-svn: 66600
2009-03-10 23:41:59 +00:00
Daniel Dunbar
ee66cf2249
Driver: Handle magic -ccc- options.
...
- Follows ccc currently, but this functionality should eventually be
outside the Driver lib.
llvm-svn: 66575
2009-03-10 20:52:46 +00:00
Daniel Dunbar
4095d89532
Remove some now-unneeded calls to llvm::errs().flush().
...
llvm-svn: 66555
2009-03-10 18:00:19 +00:00
Daniel Dunbar
d02cb1dc2b
Driver: Basic argument parsing.
...
- Add Driver::ParseArgStrings.
- Store values directly in CommaJoinedArg to support simple access.
- Add FlagArg class.
llvm-svn: 66142
2009-03-05 06:38:47 +00:00
Daniel Dunbar
b2cd66bf4d
Driver: Sink Driver/Compilation into clang::driver namespace.
...
- Add OptTable instance to Driver.
llvm-svn: 66063
2009-03-04 20:49:20 +00:00
Daniel Dunbar
b2da933989
Sketch Driver Option classes.
...
llvm-svn: 65933
2009-03-03 05:55:11 +00:00
Daniel Dunbar
544ecd14b6
Stub out some structure for C++ driver.
...
llvm-svn: 65867
2009-03-02 19:59:07 +00:00