2012-02-04 1 views
0

iOS 5.0에 연결된 Snow Leopard (10.6)에서 Xcode 4.2 프로젝트에 대한 내 단위 테스트를 gcov 스타일 프로파일 링으로 프로파일하려고합니다. -fprofile-arcs -ftest-coverage를 켜고 -lprofile_rt와 연결합니다. LLVM 3.0으로 컴파일하기.GENERIC_RELOC_SECTDIFF 프로필을 시도 할 때 아키텍처 i386에 다음 쌍이 누락되었습니다.

내 대상은 단위 테스트 번들에 의해 테스트되는 정적 라이브러리입니다.

모든 것이 잘 컴파일하지만, 단위 테스트 번들에 대한 링크 단계에서 내가 얻을 :

setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -bundle -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk "-LFoo/Build/Products/Debug Profile-iphonesimulator" -L/Developer/usr/lib "-FFoo/Build/Products/Debug Profile-iphonesimulator" -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/Developer/Library/Frameworks -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/Developer/Library/Frameworks -filelist "Foo/DerivedData/Foo/Build/Intermediates/Foo.build/Debug Profile-iphonesimulator/UnitTests.build/Objects-normal/i386/UnitTests.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fprofile-arcs -ftest-coverage -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -lFoo -framework Foundation -framework SenTestingKit -lprofile_rt -o "Foo/DerivedData/Foo/Build/Products/Debug Profile-iphonesimulator/UnitTests.octest/UnitTests"

누구나 어떤 아이디어가 :

ld: in Foo/DerivedData/Foo/Build/Intermediates/Foo.build/Debug Profile-iphonesimulator/UnitTests.build/Objects-normal/i386/TestUtilities.o, in section _DATA,_const reloc 0: GENERIC_RELOC_SECTDIFF missing following pair for architecture i386

이 실제 링크 단계입니다 왜 나는 연결할 수 없습니까?

답변

0

컴파일러에 버그가있는 것으로 나타났습니다. 내 TestUtilities.m 파일은 (STAssertEquals를 많이 사용하여) 매우 복잡했습니다. STAssertEquals 매크로는 @ try/catch 블록이있는 상당히 복잡한 코드 조각으로 확장됩니다. 약간 특색이 있지만 @try 블록이없는 자체 STAssertEquals를 정의함으로써 컴파일러/링커가 만족스럽게 생성 된 코드를 단순화했습니다. 적절한 레이더 파일을 작성하겠습니다.

+0

로 http://openradar.appspot.com/radar?id=1499403 – dmaclach

+0

으로 제출됩니다.이 문제는 Xcode 8에서 다시 나타나기 때문에 xcode가 아닌 LLVM 자체와 핵심 원인은 매우 길이 함수 정의 또는 파일 구현 일 수도 있습니다. – carbonr

관련 문제