Commit Graph

203 Commits

Author SHA1 Message Date
Douglas Gregor 23d75bb326 Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

  - We don't remove or use the current ".def" files. Instead, for now,
    we just make sure that we're building the ".inc" files.
  - Fixed CMake makefiles to run TableGen and build the ".inc" files
    when needed. Tested with both the Xcode and Makefile generators
    provided by CMake, so it should be solid.
  - Fixed normal makefiles to handle out-of-source builds that involve
    the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.

llvm-svn: 67058
2009-03-16 23:06:59 +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 a493ff47bd Update test.
llvm-svn: 66967
2009-03-13 22:11:42 +00:00
Daniel Dunbar 427d6f1a95 ccc: Handle limited forms of -ccc-host-triple for testing
compatibility with C++ rewrite.

llvm-svn: 66938
2009-03-13 20:33:09 +00:00
Daniel Dunbar 52183091f1 ccc/Driver: Forward -fheinous-gnu-extensions to clang.
llvm-svn: 66915
2009-03-13 18:12:01 +00:00
Daniel Dunbar 7326ad57a4 ccc/Driver: Normalize phase spelling in -ccc-print-phases.
llvm-svn: 66912
2009-03-13 17:52:07 +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 92d19016b5 ccc: Don't print the arch for every action when printing phases.
llvm-svn: 66886
2009-03-13 12:16:31 +00:00
Daniel Dunbar 5a3b818dea ccc/Driver: Forward -fprint-source-range-info to clang.
llvm-svn: 66879
2009-03-13 10:03:45 +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 f336cc279c ccc: Fix broken assertion.
llvm-svn: 66793
2009-03-12 15:59:34 +00:00
Daniel Dunbar 024882184b ccc: Fix -ccc-print-phases when doing a universal build.
llvm-svn: 66792
2009-03-12 15:57:47 +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 6f2650de80 ccc: Tweak some group names.
llvm-svn: 66772
2009-03-12 04:50:20 +00:00
Daniel Dunbar a27669f1d8 ccc: Cleanup arguments a bit; we don't need a separate group for
-fblocks, and there were some duplicate options scattered in.

llvm-svn: 66764
2009-03-12 03:28:55 +00:00
Daniel Dunbar d295bf1d46 ccc: -x assembler-with-cpp was broken for darwin, and it wasn't using
clang as the preprocessor even when it should.

llvm-svn: 66737
2009-03-11 23:07:54 +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 7ea58c355b Forward -ftemplate-depth-<N> to clang's -ftemplate-depth N.
llvm-svn: 66516
2009-03-10 00:35:30 +00:00
Daniel Dunbar 1e6efc0cf4 ccc: Parse -T{bss,data,text}, -iwithsysroot, -specs correctly.
Also, fix some test cases.

llvm-svn: 66425
2009-03-09 17:43:51 +00:00
Daniel Dunbar 13e9eff3f2 Fix thinko. *cough* ofcourseItestedit *cough*
llvm-svn: 66283
2009-03-06 18:35:43 +00:00
Daniel Dunbar 3a45e4fffb Tidy file removal cleanup & remove race condition on file existence.
llvm-svn: 66281
2009-03-06 18:32:01 +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 03f32e7638 ccc: Fix passing of -nozero-initialized-in-bss.
- PR3722.

llvm-svn: 66052
2009-03-04 19:17:10 +00:00
Daniel Dunbar 5637208a88 Driver: More Option implementation.
- Add Options.def file, collects option information.

 - Actual option instantiation is handled lazily by OptTable to allow
   the driver to not need to instantiate all options.

 - cast<> support for Option, other minor tweaks.

llvm-svn: 66028
2009-03-04 08:33:23 +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
Ted Kremenek 32a59b2315 Do not automatically run the 'missing -dealloc' check until we have adequate time to make it much smarter (too much noise).
llvm-svn: 65474
2009-02-25 21:08:30 +00:00
Daniel Dunbar cdff38b1f6 ccc: Don't remove result files on error when -save-temps is present.
llvm-svn: 65349
2009-02-23 23:37:18 +00:00
Daniel Dunbar 9e5dfc6111 ccc: Remove unknown host warning, it was breaking gcc's configure.
llvm-svn: 65276
2009-02-22 08:15:14 +00:00
Daniel Dunbar f175ba1d17 ccc: Remove temporary files used in compilation, and remove
compilation results on failures.

llvm-svn: 65254
2009-02-22 01:23:52 +00:00
Daniel Dunbar e8f256c7f9 Unbreak Darwin PIC handling; my refactoring yesterday was bogus.
llvm-svn: 65154
2009-02-20 20:52:47 +00:00
Daniel Dunbar 6ef6a04dd6 Fix test case.
llvm-svn: 65139
2009-02-20 18:53:07 +00:00
Daniel Dunbar ba1c8f5a3c ccc: Spell mattr correctly.
llvm-svn: 65119
2009-02-20 07:47:48 +00:00
Daniel Dunbar e1889f935a ccc: Basic translation of gcc subtarget feature options to LLVM
options (i.e., -mno-red-zone, -msoft-float, -mno-sse, etc.)
 - Also, make sure unwind tables default to on Darwin/x86_64.
 - PR3604.

llvm-svn: 65118
2009-02-20 07:35:04 +00:00
Daniel Dunbar b9b440cde6 ccc: Use toolchain hook for default relocation model value.
llvm-svn: 65116
2009-02-20 06:48:26 +00:00
Daniel Dunbar 63e03cbe8c ccc: Use toolChain arch name instead of looking for arch command line
argument; the toolchain should always know the arch.
 - Fixes: <rdar://problem/6582911> -ccc-clang-archs doesn't work for excluding ppc

llvm-svn: 65104
2009-02-20 01:48:01 +00:00
Daniel Dunbar 1b84824f83 ccc: Store arch name in all toolchains.
- No functionality change.

llvm-svn: 65102
2009-02-20 01:36:35 +00:00
Daniel Dunbar 92cfae68e9 ccc: Give all tools access to the toolchain they are in.
- No functionality change.

llvm-svn: 65100
2009-02-20 01:30:38 +00:00
Daniel Dunbar 2a07da78c0 ccc: Give nicer error when spawning a subprocess fails.
llvm-svn: 65075
2009-02-19 22:59:57 +00:00
Daniel Dunbar a118a07157 ccc: Also look for .gch files when seeing if we should auto load a
token-cache for clang.

llvm-svn: 65069
2009-02-19 22:01:23 +00:00
Daniel Dunbar 5805c98526 ccc: Forward -ftime-report to clang.
llvm-svn: 64887
2009-02-18 05:01:43 +00:00
Daniel Dunbar 7b8b7492dd ccc: Pass -{MM,MMD,MF,MP,MT} to clang. Error on -{M,MM,MG,MQ} which
clang doesn't support yet.
 - See PR3603.

llvm-svn: 64783
2009-02-17 19:02:12 +00:00
Daniel Dunbar 89f908b883 ccc: Recognize -isystem.
llvm-svn: 64776
2009-02-17 18:10:48 +00:00
Daniel Dunbar ce96aea9ec ccc: Assume gcc will accept piped assembler input when using generic GCC toolchain.
llvm-svn: 64775
2009-02-17 18:10:15 +00:00
Daniel Dunbar 8ceb91f41b ccc: Fix a FIXME.
llvm-svn: 64774
2009-02-17 18:07:00 +00:00
Ted Kremenek b535181199 Static Analyzer driver/options (partial) cleanup:
- Move all analyzer options logic to AnalysisConsumer.cpp.
- Unified specification of stores/constraints/output to be:
   -analyzer-output=...
   -analyzer-store=...
   -analyzer-constraints=...
  instead of -analyzer-range-constraints, -analyzer-store-basic, etc.
- Updated drivers (ccc-analyzer, scan-builds, new ccc) to obey this new
  interface
- Updated test cases to conform to new driver options

llvm-svn: 64737
2009-02-17 04:27:41 +00:00
Daniel Dunbar 46414874a5 ccc: Pass -f[no-]math-errno to clang.
llvm-svn: 64709
2009-02-17 00:42:05 +00:00
Daniel Dunbar a1c37501ed ccc: @<filename> arguments are only treated specially if <filename>
exists, otherwise gcc just treats as an input.
 - PR3591

llvm-svn: 64640
2009-02-16 18:18:43 +00:00
Daniel Dunbar 87f7ba3541 ccc: Pass -P to clang.
llvm-svn: 64578
2009-02-15 05:59:37 +00:00