Commit Graph

194 Commits

Author SHA1 Message Date
Douglas Gregor 9fabd851c8 Add initial *-*-rtems* target, from Joel Sherrill
llvm-svn: 134283
2011-07-01 22:41:14 +00:00
Douglas Gregor 7a20096874 Improve header search for MinGW(-w64), from Ruben Van Boxem!
llvm-svn: 133911
2011-06-27 15:47:15 +00:00
Bob Wilson f64a560d74 Make InitHeaderSearch::AddPath and HeaderSearchOptions::AddPath consistent
use an "IgnoreSysRoot" argument.  HeaderSearchOptions had been using the
opposite form with "IsSysRootRelative", which made for much confusion when
looking at true/false values in calls in AddPath.  No functional change.

llvm-svn: 133550
2011-06-21 21:53:08 +00:00
Bob Wilson b02ea3d70d Fix the default libc++ header search path to be sysrooted. Radar 9639692.
The -cxx-isystem path is not prefixed with the sysroot directory, so it's
not a good way for the driver to set the system default C++ search path.
Instead, add -stdlib as a cc1 option and teach the frontend how to find the
headers.  The driver can then just pass -stdlib through to "cc1".

llvm-svn: 133547
2011-06-21 21:12:29 +00:00
Chris Lattner 705c5c8d22 Fix a regression introduced by r131955 which broke #include_next in subtle situations
because the Angled directories and the System directories were not being uniqued 
together, breaking #include_next.  I'll see about a testcase, but it will be insane.

llvm-svn: 133212
2011-06-16 22:58:10 +00:00
Chris Lattner 0c64f4b27e code cleanups, no behavior change.
llvm-svn: 133211
2011-06-16 22:56:45 +00:00
NAKAMURA Takumi 0df100e1aa Be aware of (x86_64-redhat-linux6E-)g++44 on RHEL5.
AFAIK, RHEL5 (and its clones) provides g++44 as the package "gcc44-c++".
By default, g++-4.1.1 is available, though, its libstdc++ would not be suitable to clang++.

llvm-svn: 133156
2011-06-16 12:43:57 +00:00
Eric Christopher 12d48f7cf1 Separate out these paths a bit by architecture. There are likely other
places this is a problem.

llvm-svn: 132542
2011-06-03 13:24:15 +00:00
Eric Christopher 43a517c7ac Add multi-arch include support for Ubuntu 11.11 with gcc 4.6.0.
Patch by Tobias Hunger!

Fixes PR10008

llvm-svn: 132541
2011-06-03 13:06:30 +00:00
Nico Weber 3b1d1217f8 Make it possible for external tools to distinguish between paths that come from -I and paths that come from -system. Patch from Paul Holden!
llvm-svn: 131955
2011-05-24 04:31:14 +00:00
David Chisnall f62a8d0fb7 Add paths used by openSuSE 12.1
Patch by Ismail Dönmez!

llvm-svn: 131636
2011-05-19 12:04:49 +00:00
Eric Christopher b29614b357 Add some support for RHEL5 systems.
llvm-svn: 131505
2011-05-17 23:06:53 +00:00
Axel Naumann 71a0fe4b0c Add C++ include paths for libstdc++ with Ubuntu 11.04 and Debian's libstdc++6-4.5, as collected from http://packages.ubuntu.com/search?mode=exactfilename&suite=natty&section=all&arch=any&searchon=contents&keywords=c%2B%2Blocale.h and http://packages.debian.org/wheezy/armel/libstdc++6-4.5-dev/filelist
Fixes compilation with clang++ on Ubuntu 11.04.

llvm-svn: 130837
2011-05-04 09:25:56 +00:00
NAKAMURA Takumi c3a8529269 lib/Frontend/InitHeaderSearch.cpp: Tweak AddPath() to accept "/foo/bar" (not "X:\foo\bar") with -isysroot. test/PCH/reloc.c can pass.
FIXME: We should consider better isysroot scheme on Win32 hosts.
llvm-svn: 130683
2011-05-02 04:50:10 +00:00
Nico Weber a0b2dddcf0 Add libstdc++ search paths for GCC 4.6.0 on Arch Linux. Patch by Jakub Wieczorek.
llvm-svn: 130152
2011-04-25 20:59:30 +00:00
Daniel Dunbar 14ad22f09d ADT/Triple: Switch to using .isOSDarwin() predicate.
llvm-svn: 129823
2011-04-19 21:43:27 +00:00
Eric Christopher 534b6a01e8 Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.
Patch by Bobby Powers

llvm-svn: 129014
2011-04-06 18:22:53 +00:00
NAKAMURA Takumi 63b4b456be lib/Frontend/InitHeaderSearch.cpp: Introduce AddMinGW64CXXPaths(Base) for x86_64-w64-mingw32.
llvm-svn: 127652
2011-03-15 02:32:36 +00:00
Douglas Gregor 7ee23a8698 Add include paths for Gentoo Linux, from Marcin Mirosław!
llvm-svn: 127582
2011-03-14 15:33:44 +00:00
Douglas Gregor 189c0e8923 Add MinGW GCC 4.5.2 include paths, from Matthieu Monrocq
llvm-svn: 127124
2011-03-06 18:00:59 +00:00
Rafael Espindola c4eb31e5e5 Apply sysroot to system c++ headers too. Fixes PR9372.
llvm-svn: 126884
2011-03-02 21:30:07 +00:00
Roman Divacky 315c1675e8 On FreeBSD, make sure /usr/local/include is *not* in the default include
path.  This avoids accidentally including the wrong headers.

Patch by Dimitry Andric!

llvm-svn: 126761
2011-03-01 18:08:03 +00:00
Joerg Sonnenberger fe74286a48 Remove the storage for -cxx-system-include. Make libcxx toolchain
use -nostdinc++ and -cxx-isystem.

llvm-svn: 126223
2011-02-22 15:19:35 +00:00
Joerg Sonnenberger cc9c8eb837 Bug#8945: Add -cxx-isystem option to specify C++ system directories.
It works like -isystem and the search path keeps -isystem and
-cxx-isystem in order relative to each other. -cxx-isystem is only used
for C++ sources though. Drop the existing -cxx-system-include option for
cc1 as it is now redundant.

llvm-svn: 126167
2011-02-22 00:40:56 +00:00
NAKAMURA Takumi 49ddc3646f lib/Frontend/InitHeaderSearch.cpp: Add mingw-w64's include paths.
llvm-svn: 125743
2011-02-17 08:51:47 +00:00
NAKAMURA Takumi 31ea2f14bc Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead.
No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32.

llvm-svn: 125742
2011-02-17 08:51:38 +00:00
NAKAMURA Takumi 029d74b264 Fix whitespace.
llvm-svn: 125741
2011-02-17 08:50:50 +00:00
Rafael Espindola 41febc658b Fix the distro name.
llvm-svn: 125601
2011-02-15 21:44:06 +00:00
Rafael Espindola 65941e50ef Fix include paths on 32 bit ubuntu 10.10.
Original patch by Jonas Bülow.

llvm-svn: 125597
2011-02-15 21:16:43 +00:00
NAKAMURA Takumi fc217469c2 InitHeaderSearch.cpp: [PR8298] Don't touch drive G: on Windows hosts!
llvm-svn: 125364
2011-02-11 05:25:56 +00:00
Oscar Fuentes edeaf16f2c Moved here from LLVM Clang's configuration options and related macros.
llvm-svn: 124825
2011-02-03 22:48:20 +00:00
Benjamin Kramer 24f1d3e60a Add NetBSD target support. Patch by Joerg Sonnenberger.
llvm-svn: 124736
2011-02-02 18:59:27 +00:00
Nick Lewycky edda72658a Add updated Debian ARM include path.
llvm-svn: 124684
2011-02-01 21:32:14 +00:00
Michael J. Spencer bc7fcc2191 Remove all uses of PathV1::GetRootDirectory.
llvm-svn: 122552
2010-12-25 20:09:27 +00:00
Michael J. Spencer bc721825e8 Fix spelling.
llvm-svn: 122339
2010-12-21 16:45:42 +00:00
Michael J. Spencer f28df4cdba Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.
llvm-svn: 122087
2010-12-17 21:22:22 +00:00
Dan Gohman b16def2be9 Don't check the isysroot path for Path::isValid(); if the user has
specified a syntactically invalid path, it's better to let the OS
diagnose the problem than to silently skip it.

llvm-svn: 120542
2010-12-01 02:59:44 +00:00
Michael J. Spencer 8aaf49959c Merge System into Support.
llvm-svn: 120297
2010-11-29 18:12:39 +00:00
Chandler Carruth 7e1fd053d5 Add GCC 4.4.5 for Gentoo, and order them in a more sensible way. This allows
Gentoo systems with multiple versions to pick up the newest one first. This is
especially important with Gentoo because some of the older versions are left on
systems in strange states.

llvm-svn: 120238
2010-11-28 07:20:14 +00:00
Rafael Espindola 596402a87c Add C++ header path for openSUSE 11.4.
Patch by İsmail Dönmez.

llvm-svn: 120154
2010-11-25 18:51:59 +00:00
Chris Lattner 5159f6162e now the FileManager has a FileSystemOpts ivar, stop threading
FileSystemOpts through a ton of apis, simplifying a lot of code.
This also fixes a latent bug in ASTUnit where it would invoke
methods on FileManager without creating one in some code paths
in cindextext.

llvm-svn: 120010
2010-11-23 08:35:12 +00:00
Nico Weber 1610d47048 Add gcc-4.4.4 headers on Gentoo systems. Patch by Bertjan Broeksema!
llvm-svn: 119348
2010-11-16 12:42:55 +00:00
Chandler Carruth 40c98640e1 Remove an unintended restriction on sysroots introduced during the Path
conversion.

llvm-svn: 119346
2010-11-16 11:30:11 +00:00
Chandler Carruth 3b702674f4 Fix a think-o. Fixes PR8606.
llvm-svn: 119139
2010-11-15 09:28:23 +00:00
Chandler Carruth eb84200747 Clean up some names and fix the handling of default sysroots on Windows and
other platforms where the textual default of '/' isn't the system's root
directory. We should probably still make the textual default platform specific,
but this should avoid the particularly bad problem with the previous state: we
applied a sysroot of '/' to '/usr/local/google' which added
'//usr/local/include' to the windows header search path, a share on another
machine named 'usr'. Oops.

llvm-svn: 119131
2010-11-15 07:15:26 +00:00
Chandler Carruth 03ac1b09d1 Switch the sysroot logic to use the Path interface, resolving a FIXME and
making the code less gross.

llvm-svn: 119099
2010-11-15 00:48:13 +00:00
Chandler Carruth c4d6fd5b03 Make sysroot only apply to baked in paths which start with a '/'.
llvm-svn: 119095
2010-11-15 00:05:18 +00:00
Argyrios Kyrtzidis 71731d6b05 Implement -working-directory.
When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
This helps both when using libclang (where we can't require the user to actually change the working directory)
and to help reproduce test cases when the reproduction work comes along.

--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
 the working directory value if set).
--FileSystemOptions are passed around to various interfaces that perform file operations.
--Opening & reading the content of files should be done only through FileManager. This is useful in general since
 file operations will be abstracted in the future for the reproduction mechanism.

FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
FileManager but with different FileSystemOptions.

Addresses rdar://8583824.

llvm-svn: 118203
2010-11-03 22:45:23 +00:00
Rafael Espindola d79d31204c Add support for Fedora 14. Patch by Daniel Kozlowski.
llvm-svn: 118035
2010-11-02 18:39:34 +00:00
NAKAMURA Takumi e4faafba32 lib/Frontend/InitHeaderSearch.cpp: Fix compatibility to Cygming.
- lib/gcc/include should not be included. Clang oughta have alternatives. (PR7956)
  - Cygwin: /usr/include/w32api should be included. gcc/cygwin does.
  - gcc/cygwin uses gcc paths as /usr/lib not /lib. They are same on Cygwin environment, though, We have to take what gcc/cygwin does.
  - Cygwin-1.7: Use 4.3.4.
  - Cygwin-1.5: Use 4.3.2 for gcc-4.

llvm-svn: 116182
2010-10-11 02:27:37 +00:00
Nuno Lopes d4e42830cb add latest gentoo gcc path
llvm-svn: 113696
2010-09-11 17:51:45 +00:00
Daniel Dunbar 0166c95fdd Frontend: Add -cxx-system-include option which can be used to specify an
explicit list for the C++ system include directories at the -cc1 level, as an
alternative to the horrible AddDefaultCPlusPlusIncludePaths().

llvm-svn: 113505
2010-09-09 17:38:22 +00:00
Daniel Dunbar 1cf2d54987 Fix indentation.
llvm-svn: 113504
2010-09-09 17:38:18 +00:00
Chris Lattner c766b6edd1 fix lookup of bits/c++config.h on mingw, patch by Ismail Donmez!
llvm-svn: 112969
2010-09-03 16:45:53 +00:00
Chris Lattner 988fd16060 add a new version of mingw, patch by İsmail "cartman" Dönmez
in PR8049

llvm-svn: 112710
2010-09-01 15:51:58 +00:00
Anton Korobeynikov 1b80c2aaee Add NetBSD include search path
llvm-svn: 112663
2010-08-31 22:39:50 +00:00
Chris Lattner 576048657e correct the -isystem option to not add the -isysroot path. Only the weird
-iwithsysroot flag should do that.  This fixes rdar://8345942

llvm-svn: 111979
2010-08-24 22:27:37 +00:00
Eli Friedman 04831926ec Detabify.
llvm-svn: 111768
2010-08-22 01:00:03 +00:00
Michael J. Spencer b186bc3c4b Visual Studio tools used on win32 hosts when targeting win32.
llvm-svn: 111748
2010-08-21 21:55:07 +00:00
Daniel Dunbar ea3813fbc9 Driver/OpenBSD: Update toolchain for compiler changes / C++; patch by Jonathan
Gray.

llvm-svn: 109994
2010-08-01 23:13:54 +00:00
Nick Lewycky e602efc6f6 Remove emacs file mode marker on file with .cpp extension.
llvm-svn: 109366
2010-07-25 03:12:58 +00:00
Nick Lewycky 84a11fdf57 Add header searching for llvm-gcc trunk on Gentoo AMD64. Patch by Mark Wood!
llvm-svn: 109357
2010-07-24 21:33:13 +00:00
Chris Lattner 3e2ee147d0 add driver support for minix, patch by Kees van Reeuwijk
from PR7583

llvm-svn: 107788
2010-07-07 16:01:42 +00:00
Douglas Gregor f56055aee3 Add Cygwin C++ header search path.
llvm-svn: 106108
2010-06-16 16:24:51 +00:00
Rafael Espindola 92eb2cbbef Add ARM paths for debian. Not enough to bootstrap on a beagle board, but
moves us further.

llvm-svn: 105468
2010-06-04 14:28:10 +00:00
Douglas Gregor 117ef277cb More PowerPC paths on Darwin
llvm-svn: 105084
2010-05-29 01:21:11 +00:00
Douglas Gregor eb0bdf08dc Add C++ include paths for Darwin PowerPC
llvm-svn: 105083
2010-05-29 01:15:12 +00:00
Chris Lattner 2304c4d0ff add fedora 13 paths, patch by Hendrik Richter.
llvm-svn: 105082
2010-05-29 01:01:38 +00:00
Daniel Dunbar eaff5fa30a Frontend: Sprinkle in some C++ header paths for ARM/Darwin. Also, don't add x86
paths on non-x86.

I really detest this file.

llvm-svn: 104921
2010-05-28 01:54:31 +00:00
Douglas Gregor 923d2252dc "The attached patch allows clang to find the headers
for Visual Studio 2010.  It also adds a registry search
for the Express edition,", from Steven Watanabe!

llvm-svn: 104015
2010-05-18 05:47:04 +00:00
mike-m c6da261fb4 Moved clang-builtin include dir position to immediately precede C includes.
This aligns with how gcc compiler does things.

llvm-svn: 103912
2010-05-16 19:03:52 +00:00
mike-m b49148807a Reverted part of r103177 (repositioning of clang-builtin include/)
which breaks clang-i686-xp-msvc9 test-clang.

llvm-svn: 103180
2010-05-06 15:23:52 +00:00
mike-m 94ab2902fe Reposition clang-builtin include/ to immediately precede /usr/include/,
matching gcc compiler. Fixes #include_next <...> shenanigans that lead to
file-not-found failures with <cstddef> on libstdc++ 4.3.[012].

Updated C++ include header search paths for various Debian/Ubuntu and Fedora
linux distros.

llvm-svn: 103177
2010-05-06 14:11:13 +00:00
mike-m 6fa3cd26e9 Test commit.
llvm-svn: 103090
2010-05-05 17:00:31 +00:00
Chris Lattner 5561bf3d11 fit in 80 cols
llvm-svn: 103075
2010-05-05 05:28:39 +00:00
Chris Lattner 092d1c9f64 add GNU C++ include paths for Fedora 11,12 x86_64,
patch by mikem!

llvm-svn: 102177
2010-04-23 15:55:20 +00:00
Dan Gohman 145f3f1e83 Fix -Wcast-qual warnings.
llvm-svn: 101786
2010-04-19 16:39:44 +00:00
Chris Lattner b986aba6db add haiku support, patch by Paul Davey!
llvm-svn: 100982
2010-04-11 19:29:39 +00:00
Douglas Gregor 64b046fce4 Implement support for -nostdc++. Fixes PR6446.
llvm-svn: 99417
2010-03-24 20:13:48 +00:00
Chris Lattner 8341c390aa on both the mac and linux, /usr/local/include is treated
as a "C++ Friendly" system header directory.  This fixes
PR6523.

llvm-svn: 97885
2010-03-06 19:38:10 +00:00
Eric Christopher 6197c1cd8c Remove the linux c includes part of my last patch.
llvm-svn: 97679
2010-03-03 23:27:49 +00:00
Eric Christopher 114a85381a Add in more c++ header paths for later gccs under gentoo linux.
Add in c header path for various linuxes as well.

Partial patch from Christian Adåker!

llvm-svn: 97666
2010-03-03 21:41:50 +00:00
Nick Lewycky 48f74d2c9a Debian sid moved these headers into /4.4 and left /4.4.3 as a symlink. Update.
Also, add support for 32-bit x86 Debian sid.

llvm-svn: 97347
2010-02-27 22:35:43 +00:00
Chris Lattner ef538b52a3 add support for t Fedora 12 (February 2010), patch by
Dyachenko Dmitry.  Our system is "not so elegant" here.

llvm-svn: 96111
2010-02-13 19:18:26 +00:00
Benjamin Kramer ea9f3f240c Update C++ include paths for Exherbo, by Ingmar Vanhassel.
llvm-svn: 94420
2010-01-25 12:20:15 +00:00
Benjamin Kramer 9c22cc800f Make some helper functions static.
llvm-svn: 94004
2010-01-20 16:21:40 +00:00
Benjamin Kramer c1a62aa67d Don't store a Twine temporary, it's unsafe.
llvm-svn: 94003
2010-01-20 16:18:11 +00:00
Chris Lattner e87668db26 add support for Fedora 10 x86_64, there really should be a better way to handle this.
patch by Dmitry

llvm-svn: 93948
2010-01-19 23:30:00 +00:00
Nuno Lopes 28b40ddbe8 PR6055: fix FreeBSD c++ include path. patch by Roman Divacky
llvm-svn: 93668
2010-01-17 00:00:11 +00:00
Chris Lattner 002ba6b4d0 improve support for dragonfly, patch by Sascha Wildner!
llvm-svn: 93044
2010-01-09 05:41:14 +00:00
Torok Edwin d0139fd3e5 Debian has x86_64-linux-gnu, not x86_64-pc-linux-gnu, so add it.
llvm-svn: 91698
2009-12-18 17:43:54 +00:00
Torok Edwin 029707885c Move the 4.4.2 c++ include search to the top, otherwise it was picking the 4.1.3
dirs on my system. Which is wrong, since it was missing the x86_64-pc-linux-gnu
suffix.

llvm-svn: 91694
2009-12-18 17:29:14 +00:00
Daniel Dunbar a5a166d01a Add -resource-dir to clang -cc1, this allows the base directory for compiler
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.

llvm-svn: 91370
2009-12-15 00:06:45 +00:00
Daniel Dunbar d613677ec9 CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.
llvm-svn: 91237
2009-12-13 03:45:58 +00:00
Benjamin Kramer c6ad84cb3c Twinify InitHeaderSearch::AddPath and use it in C++ include path generation.
llvm-svn: 90853
2009-12-08 12:38:20 +00:00
Benjamin Kramer 141c7f987a Use StringRefs in InitHeaderSearch::AddDelimitedPaths.
llvm-svn: 90852
2009-12-08 12:11:06 +00:00
Nuno Lopes c4413fbb88 add fedora 12 include path
llvm-svn: 90772
2009-12-07 17:18:48 +00:00
Daniel Dunbar f680e7d855 Kill a few more random stderr uses.
llvm-svn: 90441
2009-12-03 09:14:02 +00:00
John Thompson d976d3e552 Put back hard-coded paths for win32 until I figure out what happened to failed tests.
llvm-svn: 89677
2009-11-23 17:49:27 +00:00
Rafael Espindola 962e518da2 Reorder the header search a bit so that it matches gcc exactly:
*) the ../backward dir is the last in libstdc++ to be searched
*) If compiling c++, the c++ headers are searched first

llvm-svn: 89661
2009-11-23 16:31:19 +00:00