Home | History | Annotate | Download | only in Driver
      1 // RUN: %clang -target i686-pc-linux-gnu -### -nostdlib %s 2> %t
      2 // RUN: FileCheck < %t %s
      3 //
      4 // CHECK-NOT: start-group
      5 
      6 // Most of the toolchains would check for -nostartfiles and -nostdlib
      7 // in a short-circuiting boolean expression, so if both of the preceding
      8 // options were present, the second would warn about being unused.
      9 // RUN: %clang -### -nostartfiles -nostdlib -target i386-apple-darwin %s \
     10 // RUN:   2>&1 | FileCheck %s -check-prefix=ARGSCLAIMED
     11 // ARGSCLAIMED-NOT: warning:
     12 
     13 // In the presence of -nostdlib, the standard libraries should not be
     14 // passed down to link line
     15 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
     16 // RUN:     -target i686-pc-linux-gnu -nostdlib --rtlib=compiler-rt \
     17 // RUN:     -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \
     18 // RUN:   | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s
     19 //
     20 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
     21 // RUN:     -target i686-pc-linux-gnu --rtlib=compiler-rt -nostdlib \
     22 // RUN:     -resource-dir=%S/Inputs/resource_dir -lclang_rt.builtins-i686 \
     23 // RUN:   | FileCheck --check-prefix=CHECK-LINUX-NOSTDLIB %s
     24 //
     25 // CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt'
     26 // CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
     27 // CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.builtins-i686.a"
     28