*) Try to detect as much as possible from the system itself, not the distro.
This should make it easier to port to a new distro and more likely to
work on a unknown one.
*) The distro enum now doesn't include the arch. Just use the existing
host detection support in LLVM.
*) Correctly handle --sysroot.
A small regression is that now clang will pass bitcode file to the linker.
This is necessary for the gold plugin support to work.
It might be better to detect this at configure/cmake time, but doing it in
c++ first is a lot easier.
llvm-svn: 118382
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
distros listed by running
gcc main.o -o main
g++ main.o -o main
gcc main.o -o main -static
g++ main.o -o main -static
gcc f.o -o f.so -shared
g++ f.o -o f.so -shared
and comparing the ld line with the one created by clang. I also added
-m32/m64 in distros that support it.
While I tested many distros, there will always be more. If you are hit by this
it should be somewhat easy to add your distro. If you are in a hurry, do
revert this, but please inform how to detect you distro and the ld command
lines produced by the above gcc invocations. Most distros have some patches
on gcc :-(
llvm-svn: 118149
This adds an option to set the _MSC_VER macro without
recompiling. This is very useful when testing compatibility
with the Windows SDK and c++stdlib headers.
-fmsc-version=<version> (defaults to VS2003 (1300))
llvm-svn: 116999
'../lib/clang/<version>'. Actually use '..' rather than removing the trailing
component to correctly handle paths containing '.' or symlinks in the presence
of -no-canonical-prefixes, etc. This shouldn't change any existing behavior.
llvm-svn: 116803
-Wa,-force_cpusubtype_ALL t.c'.
- Tweaks -Wa, and -Xassembler handling to only accept an explicit short list of
arguments and give an obvious unsupported error on others.
llvm-svn: 116759
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.
llvm-svn: 116250
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.
llvm-svn: 115188