diff options
Diffstat (limited to 'clang/tools/ccc/ccclib/Tools.py')
| -rw-r--r-- | clang/tools/ccc/ccclib/Tools.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/tools/ccc/ccclib/Tools.py b/clang/tools/ccc/ccclib/Tools.py index 62720624cb1..a24255c652f 100644 --- a/clang/tools/ccc/ccclib/Tools.py +++ b/clang/tools/ccc/ccclib/Tools.py @@ -247,12 +247,14 @@ class Clang_CompileTool(Tool): 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') |

