From: Daniel Dunbar Date: Fri, 16 Jan 2009 21:20:42 +0000 (+0000) Subject: ccc: Fix thinko, add gross but effective test of translation for Darwin/X86/cc1. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a22c16dd89bc67dda755980df871c799b13da1fa;p=clang ccc: Fix thinko, add gross but effective test of translation for Darwin/X86/cc1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62360 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py index 79979a09c8..d10081224a 100644 --- a/tools/ccc/ccclib/Driver.py +++ b/tools/ccc/ccclib/Driver.py @@ -127,7 +127,7 @@ class Driver(object): elif opt == 'host-release': self.cccHostRelease,argv = argv[0],argv[1:] else: - raise ValueError,"Invalid ccc option: %r" % cccPrintOptions + raise ValueError,"Invalid ccc option: %r" % opt self.hostInfo = HostInfo.getHostInfo(self) self.toolChain = self.hostInfo.getToolChain() diff --git a/tools/ccc/test/ccc/darwin-x86-cc1.m b/tools/ccc/test/ccc/darwin-x86-cc1.m new file mode 100644 index 0000000000..91fe0888b4 --- /dev/null +++ b/tools/ccc/test/ccc/darwin-x86-cc1.m @@ -0,0 +1,4 @@ +// RUN: xcc -ccc-host-bits 32 -ccc-host-machine i386 -ccc-host-system darwin -ccc-host-release 10.5.0 -### -x objective-c -arch i386 -fmessage-length=0 -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -DUSER_DEFINE_0 -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -IINCLUDE_PATH_0 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-four-char-constants -Wno-unknown-pragmas -Wno-format-y2k -Wpointer-arith -Wreturn-type -Wwrite-strings -Wswitch -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wint-to-pointer-cast -Wpointer-to-int-cast -Wshorten-64-to-32 -FFRAMEWORK_0 -IINCLUDE_PATH_1 -FFRAMEWORK_1 -include USER_INCLUDE_0 -c %s -o %t.out &> %t.opts && +// RUN: grep ' "/usr/libexec/gcc/i686-apple-darwin10/4.2.1/cc1obj" "-quiet" "-IINCLUDE_PATH_0" "-FFRAMEWORK_0" "-IINCLUDE_PATH_1" "-FFRAMEWORK_1" "-D__DYNAMIC__" "-DUSER_DEFINE_0" "-include" "USER_INCLUDE_0" "darwin-x86-cc1.m" "-quiet" "-dumpbase" "darwin-x86-cc1.m" "-mpascal-strings" "-mdynamic-no-pic" "-mmacosx-version-min=10.5" "-mtune=core2" "-auxbase-strip" "Output/darwin-x86-cc1.m.out.tmp.out" "-gdwarf-2" "-Os" "-Wno-trigraphs" "-Wall" "-Wextra" "-Wno-missing-field-initializers" "-Wno-unused-parameter" "-Wno-four-char-constants" "-Wno-unknown-pragmas" "-Wno-format-y2k" "-Wpointer-arith" "-Wreturn-type" "-Wwrite-strings" "-Wswitch" "-Wcast-align" "-Wchar-subscripts" "-Winline" "-Wnested-externs" "-Wint-to-pointer-cast" "-Wpointer-to-int-cast" "-Wshorten-64-to-32" "-fmessage-length=0" "-fasm-blocks" "-fvisibility=hidden" "-o"' %t.opts && +// RUN: grep ' "/usr/libexec/gcc/i686-apple-darwin10/4.2.1/as" "-arch" "i386" "-force_cpusubtype_ALL" "-o" "Output/darwin-x86-cc1.m.out.tmp.out" ' %t.opts +