http://llvm.org/bugs/show_bug.cgi?id=22490

            Bug ID: 22490
           Summary: clang 3.6: inconsistent claiming of options -nostdlib
                    vs. -nostartfiles
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

When compiling, -nostdlib seems to get claimed while -nostartfiles and
-nodefaultlibs are not.

When linking, -isystem seems to get claimed while -nostdinc and -nostdinc++ are
not.

I think it would be nice to claim all these options as it makes it easier to
write clang-XXX wrapper scripts.

$ echo 'int x = 1;' > test.c

#
# compiling
#

$ clang-3.6.0rc2 -target i386-linux -c test.c

$ clang-3.6.0rc2 -target i386-linux -nostdlib -c test.c

$ clang-3.6.0rc2 -target i386-linux -nostartfiles -c test.c
clang: warning: argument unused during compilation: '-nostartfiles'

$ clang-3.6.0rc2 -target i386-linux -nodefaultlibs -c test.c
clang: warning: argument unused during compilation: '-nodefaultlibs'

#
# linking
#

$ clang-3.6.0rc2 -target i386-linux -shared -o test.so test.o

$ clang-3.6.0rc2 -target i386-linux -isystem /usr/include -shared -o test.so
test.o

$ clang-3.6.0rc2 -target i386-linux -nostdinc -shared -o test.so test.o
clang: warning: argument unused during compilation: '-nostdinc'

$ clang-3.6.0rc2 -target i386-linux -nostdinc++ -shared -o test.so test.o
clang: warning: argument unused during compilation: '-nostdinc++'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to