New issue
Advanced search Search tips

Issue 602649 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug

Blocked on:
issue 645953



Sign in to add a comment

Need libclang_rt.asan_iossim_dynamic.dylib

Project Member Reported by stkhapugin@chromium.org, Apr 12 2016

Issue description

We would like to enable ASan on iOS. 

We were able to do that with Xcode clang, but we also want to have it with tot clang.

Please add libclang_rt.asan_iossim_dynamic.dylib to our clang next to libclang_rt.asan_osx_dynamic.dylib.
 

Comment 1 by thakis@chromium.org, Apr 12 2016

Owner: ----
Status: Available (was: Assigned)
I looked into something similar a while ago ( bug 450379 ) and iirc the clang cmake build didn't easily build all the iOS runtime stuff back then. It's possible this is still the case for this.

If you want to give it a try, just the packaging bit is easy (see tools/clang/scripts/package.py).

I'm not sure if the simulator makes any assumptions about the runtime, so even if it built I'm not sure it'll work. (It might.)

Comment 2 by thakis@chromium.org, Apr 12 2016

Labels: Clang
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d957e66e8df2c23d18b9ef64a06088c1b6578fc3

commit d957e66e8df2c23d18b9ef64a06088c1b6578fc3
Author: sdefresne <sdefresne@chromium.org>
Date: Sun Apr 17 12:02:59 2016

[clang] Enable compilation of compiler runtime for iOS simulator.

This is required to enable ASan and coverage on simulators (and
other tools like UBSan, TSan, ...).

BUG= 450379 , 602649 

Review URL: https://codereview.chromium.org/1883723003

Cr-Commit-Position: refs/heads/master@{#387832}

[modify] https://crrev.com/d957e66e8df2c23d18b9ef64a06088c1b6578fc3/tools/clang/scripts/package.py
[modify] https://crrev.com/d957e66e8df2c23d18b9ef64a06088c1b6578fc3/tools/clang/scripts/update.py

Status: Started (was: Available)
This is now waiting on a roll of clang, will close it once the roll lands.
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3194921862487f646d137dcc90e185b27c2e5cb7

commit 3194921862487f646d137dcc90e185b27c2e5cb7
Author: thakis <thakis@chromium.org>
Date: Mon Apr 18 15:35:57 2016

Revert of [clang] Enable compilation of compiler runtime for iOS simulator. (patchset #2 id:20001 of https://codereview.chromium.org/1883723003/ )

Reason for revert:
Breaks clang tot bots:

https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/8735

[3388/3417] Building CXX object lib/tsan/CMakeFiles/clang_rt.tsan_osx_dynamic.dir/rtl/tsan_interface_ann.cc.o
FAILED: /Applications/Xcode7.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -Dclang_rt_tsan_iossim_dynamic_EXPORTS -DLLVM_FORCE_HEAD_REVISION -Wall -std=c++11 -O3 -DNDEBUG -arch x86_64 -isysroot /Applications/Xcode7.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -fPIC -I/b/build/slave/ClangToTMac/build/src/third_party/llvm/compiler-rt/lib/tsan/..     -stdlib=libc++ -miphoneos-version-min=7.0 -isysroot /Applications/Xcode7.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fvisibility-inlines-hidden -fno-function-sections -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fPIE -fno-rtti -msse3 -Wframe-larger-than=512 -Wglobal-constructors -MMD -MT lib/tsan/CMakeFiles/clang_rt.tsan_iossim_dynamic.dir/rtl/tsan_interceptors_mac.cc.o -MF lib/tsan/CMakeFiles/clang_rt.tsan_iossim_dynamic.dir/rtl/tsan_interceptors_mac.cc.o.d -o lib/tsan/CMakeFiles/clang_rt.tsan_iossim_dynamic.dir/rtl/tsan_interceptors_mac.cc.o -c /b/build/slave/ClangToTMac/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc
/b/build/slave/ClangToTMac/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:24:10: fatal error: 'xpc/xpc.h' file not found
#include <xpc/xpc.h>
         ^

Maybe that file shouldn't be built in iOS builds? Looks like some upstream build config problem; for now revert to get our bots back green.

Original issue's description:
> [clang] Enable compilation of compiler runtime for iOS simulator.
>
> This is required to enable ASan and coverage on simulators (and
> other tools like UBSan, TSan, ...).
>
> BUG= 450379 , 602649 
>
> Committed: https://crrev.com/d957e66e8df2c23d18b9ef64a06088c1b6578fc3
> Cr-Commit-Position: refs/heads/master@{#387832}

TBR=sdefresne@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 450379 , 602649 

Review URL: https://codereview.chromium.org/1893353002

Cr-Commit-Position: refs/heads/master@{#387914}

[modify] https://crrev.com/3194921862487f646d137dcc90e185b27c2e5cb7/tools/clang/scripts/package.py
[modify] https://crrev.com/3194921862487f646d137dcc90e185b27c2e5cb7/tools/clang/scripts/update.py

Cc: -sdefresne@chromium.org thakis@chromium.org
Owner: sdefresne@chromium.org
thakis: has the upstream issue that forced us to rollback been fixed? Can I reland the CL https://codereview.chromium.org/1883723003?
i clicked https://codereview.chromium.org/1883723003 then its revert https://codereview.chromium.org/1893353002/ then found the "filed https://llvm.org/bugs/show_bug.cgi?id=27403" comment, clicked that link, which after some further surfing finds http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160425/351057.html -- this sounds like it could work for us. So yes, try relanding, see what happens.
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ca7c2f9c666a565821518072f65ba38c0d51c223

commit ca7c2f9c666a565821518072f65ba38c0d51c223
Author: sdefresne <sdefresne@chromium.org>
Date: Thu Sep 15 17:32:51 2016

Reland of enable compilation of compiler runtime for iOS simulator.

Was reverted in https://codereview.chromium.org/1893353002/ and the
underlying issue has since been fixed.

This is required to enable ASan and coverage on simulators (and
other tools like UBSan, TSan, ...).

BUG= 450379 , 602649 

Review-Url: https://codereview.chromium.org/2344573003
Cr-Commit-Position: refs/heads/master@{#418896}

[modify] https://crrev.com/ca7c2f9c666a565821518072f65ba38c0d51c223/tools/clang/scripts/package.py
[modify] https://crrev.com/ca7c2f9c666a565821518072f65ba38c0d51c223/tools/clang/scripts/update.py

Comment 9 by thakis@chromium.org, Sep 20 2016

Blockedon: 645953
Status: Fixed (was: Started)
Fixed after https://codereview.chromium.org/2361513002

Sign in to add a comment