diff options
Diffstat (limited to 'clang/tools/ccc/ccclib/Tools.py')
| -rw-r--r-- | clang/tools/ccc/ccclib/Tools.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/tools/ccc/ccclib/Tools.py b/clang/tools/ccc/ccclib/Tools.py index a9db01ac124..9d3bd8eeb8a 100644 --- a/clang/tools/ccc/ccclib/Tools.py +++ b/clang/tools/ccc/ccclib/Tools.py @@ -255,7 +255,16 @@ class Clang_CompileTool(Tool): arglist.getLastArg(arglist.parser.f_pieOption)) picDisabled = (arglist.getLastArg(arglist.parser.m_kernelOption) or arglist.getLastArg(arglist.parser.staticOption)) - model = self.toolChain.getRelocationModel(picEnabled, picDisabled) + model = self.toolChain.getForcedPicModel() + if not model: + if arglist.getLastArg(arglist.parser.m_dynamicNoPicOption): + model = 'dynamic-no-pic' + elif picDisabled: + model = 'static' + elif picEnabled: + model = 'pic' + else: + model = self.toolChain.getDefaultRelocationModel() cmd_args.append('--relocation-model=%s' % model) if arglist.getLastArg(arglist.parser.f_timeReportOption): |

