ccc: Honor -ccc-clang for generic GCC toolchain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63277 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/Tools.py b/tools/ccc/ccclib/Tools.py
index 6272062..a24255c 100644
--- a/tools/ccc/ccclib/Tools.py
+++ b/tools/ccc/ccclib/Tools.py
@@ -247,12 +247,14 @@
                           not arglist.getLastArg(arglist.parser.staticOption) and
                           not arglist.getLastArg(arglist.parser.m_dynamicNoPicOption)))
 
-            archName = arglist.getValue(arch)
-            if (archName == 'x86_64' or 
-                picEnabled):
-                cmd_args.append('--relocation-model=pic')
-            elif not arglist.getLastArg(arglist.parser.m_dynamicNoPicOption):
-                cmd_args.append('--relocation-model=static')
+            # FIXME: This needs to tie into a platform hook.
+            if arch:
+                archName = arglist.getValue(arch)
+                if (archName == 'x86_64' or 
+                    picEnabled):
+                    cmd_args.append('--relocation-model=pic')
+                elif not arglist.getLastArg(arglist.parser.m_dynamicNoPicOption):
+                    cmd_args.append('--relocation-model=static')
 
             if arglist.getLastArg(arglist.parser.f_timeReportOption):
                 cmd_args.append('--time-passes')