From: Daniel Dunbar Date: Fri, 6 Feb 2009 19:18:58 +0000 (+0000) Subject: ccc/Darwin: Add a missing Darwin argument translation, -shared becomes X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ceb041eb34ba5457bac0c9e98d3661264027307;p=clang ccc/Darwin: Add a missing Darwin argument translation, -shared becomes -dynamiclib. Re-audited translations to make sure I didn't miss something else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63953 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/ccc/ccclib/ToolChain.py b/tools/ccc/ccclib/ToolChain.py index 6ce6ebc341..2fd500ce18 100644 --- a/tools/ccc/ccclib/ToolChain.py +++ b/tools/ccc/ccclib/ToolChain.py @@ -194,6 +194,8 @@ class Darwin_X86_ToolChain(ToolChain): elif arg.opt is args.parser.f_indirectVirtualCallsOption: al.append(al.makeFlagArg(args.parser.f_appleKextOption)) al.append(al.makeFlagArg(args.parser.staticOption)) + elif arg.opt is args.parser.sharedOption: + al.append(al.makeFlagArg(args.parser.dynamiclibOption)) elif arg.opt is args.parser.f_constantCfstringsOption: al.append(al.makeFlagArg(args.parser.m_constantCfstringsOption)) elif arg.opt is args.parser.f_noConstantCfstringsOption: diff --git a/tools/ccc/test/ccc/darwin-ld-shared.c b/tools/ccc/test/ccc/darwin-ld-shared.c new file mode 100644 index 0000000000..7aa2252489 --- /dev/null +++ b/tools/ccc/test/ccc/darwin-ld-shared.c @@ -0,0 +1,7 @@ +// -shared translates to -dynamiclib on darwin. +// RUN: xcc -ccc-host-system darwin -### -filelist a &> %t.1 && +// RUN: xcc -ccc-host-system darwin -### -filelist a -shared &> %t.2 && + +// -dynamiclib turns on -dylib +// RUN: not grep -- '-dylib' %t.1 && +// RUN: grep -- '-dylib' %t.2