Rafael Espindola c8f008f649 Use ld directly on linux. Changes from the previous try:
*) 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
2010-11-07 20:14:31 +00:00

11 lines
382 B
C

// Check that -O4 is only honored as the effective -O option.
// <rdar://problem/7046672> clang/loader problem
// RUN: %clang -ccc-print-phases -c -O4 -O0 %s 2> %t
// RUN: FileCheck --check-prefix=O4_AND_O0 %s < %t
// O4_AND_O0: 0: input, "{{.*}}", c
// O4_AND_O0: 1: preprocessor, {0}, cpp-output
// O4_AND_O0: 2: compiler, {1}, assembler
// O4_AND_O0: 3: assembler, {2}, object