diff options
-rw-r--r-- | tools/ccc/ccclib/ToolChain.py | 2 | ||||
-rw-r--r-- | tools/ccc/test/ccc/darwin-ld-shared.c | 7 |
2 files changed, 9 insertions, 0 deletions
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 |