r194820 - [ASan] Link with libclang_rt.asan_iossim_dynamic.dylib when targeting the iOS simulator.
Alexander Potapenko
glider at google.com
Sun Nov 17 20:42:49 PST 2013
Renato,
Looking at the bot now I can tell that my next commit fixed it. Will check
that today.
On Nov 17, 2013 11:57 PM, "Renato Golin" <renato.golin at linaro.org> wrote:
> Hi Alexander,
>
> Your commit broke the ARM buildbot.
>
>
> http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/13364/steps/check-all/logs/Clang%3A%3Adarwin-sanitizer-ld.c
>
> cheers,
> --renato
>
>
> On 15 November 2013 16:07, Alexander Potapenko <glider at google.com> wrote:
>
>> Author: glider
>> Date: Fri Nov 15 10:07:44 2013
>> New Revision: 194820
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=194820&view=rev
>> Log:
>> [ASan] Link with libclang_rt.asan_iossim_dynamic.dylib when targeting the
>> iOS simulator.
>> Add a test.
>>
>>
>> Modified:
>> cfe/trunk/lib/Driver/ToolChains.cpp
>> cfe/trunk/test/Driver/darwin-sanitizer-ld.c
>>
>> Modified: cfe/trunk/lib/Driver/ToolChains.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=194820&r1=194819&r2=194820&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Driver/ToolChains.cpp (original)
>> +++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Nov 15 10:07:44 2013
>> @@ -329,8 +329,17 @@ void DarwinClang::AddLinkRuntimeLibArgs(
>> // The ASAN runtime library requires C++.
>> AddCXXStdlibLibArgs(Args, CmdArgs);
>> }
>> - AddLinkRuntimeLib(Args, CmdArgs,
>> - "libclang_rt.asan_osx_dynamic.dylib", true);
>> + if (isTargetMacOS()) {
>> + AddLinkRuntimeLib(Args, CmdArgs,
>> + "libclang_rt.asan_osx_dynamic.dylib",
>> + true);
>> + } else {
>> + if (isTargetIOSSimulator()) {
>> + AddLinkRuntimeLib(Args, CmdArgs,
>> + "libclang_rt.asan_iossim_dynamic.dylib",
>> + true);
>> + }
>> + }
>> }
>> }
>>
>>
>> Modified: cfe/trunk/test/Driver/darwin-sanitizer-ld.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-sanitizer-ld.c?rev=194820&r1=194819&r2=194820&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/test/Driver/darwin-sanitizer-ld.c (original)
>> +++ cfe/trunk/test/Driver/darwin-sanitizer-ld.c Fri Nov 15 10:07:44 2013
>> @@ -9,6 +9,14 @@
>> // CHECK-ASAN: libclang_rt.asan_osx_dynamic.dylib"
>>
>> // RUN: %clang -no-canonical-prefixes -### -target x86_64-darwin \
>> +// RUN: -fsanitize=address -mios-simulator-version-min=7.0 %s -o %t.o
>> 2>&1 \
>> +// RUN: | FileCheck --check-prefix=CHECK-ASAN-IOSSIM %s
>> +
>> +// CHECK-ASAN-IOSSIM: "{{.*}}ld{{(.exe)?}}"
>> +// CHECK-ASAN-IOSSIM: stdc++
>> +// CHECK-ASAN-IOSSIM: libclang_rt.asan_iossim_dynamic.dylib"
>> +
>> +// RUN: %clang -no-canonical-prefixes -### -target x86_64-darwin \
>> // RUN: -fPIC -shared -fsanitize=address %s -o %t.so 2>&1 \
>> // RUN: | FileCheck --check-prefix=CHECK-DYN-ASAN %s
>>
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131118/40dc2aef/attachment.html>
More information about the cfe-commits
mailing list