<div dir="ltr">OS: 10.12.6 (16G29)<div><br></div><div>Steps:</div><div>1) Checkout swift and build master branch</div><div> <span style="background-color:transparent;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;color:rgb(36,41,46)">git clone <a href="https://github.com/apple/swift.git" target="_blank">https://github.com/apple/<wbr>swift.git</a></span></div><div><span style="background-color:transparent;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;color:rgb(36,41,46)"> </span><span style="background-color:transparent;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;color:rgb(36,41,46)">./swift/utils/update-checkout --clone</span></div><div><span style="background-color:transparent;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;color:rgb(36,41,46)"><br></span></div><div><span style="background-color:transparent;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;color:rgb(36,41,46)">2) Edit swift/utils/build-presets.ini to remove tests</span></div><div><span style="background-color:transparent;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;color:rgb(36,41,46)"> </span><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:13.6px">[preset: buildbot_osx_package]</span></font></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:13.6px"> mixin-preset=</span></font></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:13.6px"> mixin_osx_package_base</span></font></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:13.6px"> mixin_lightweight_assertions</span></font></div><div> ...</div><div>3) Execute ./swift/utils/build-toolchain local.swift</div><div><br></div><div>4) Execute n sample swift package in Xcode:<br><div><br></div><div>Error:</div><div>
<p class="m_6764313438307663510gmail-p1">Invalid bitcast</p>
<p class="m_6764313438307663510gmail-p1"><span class="m_6764313438307663510gmail-Apple-converted-space"> </span>%195 = bitcast i64 %194 to %objc_object*, !dbg !431</p>
<p class="m_6764313438307663510gmail-p1">Invalid bitcast</p>
<p class="m_6764313438307663510gmail-p1"><span class="m_6764313438307663510gmail-Apple-converted-space"> </span>%256 = bitcast i64 %255 to %objc_object*, !dbg !443</p>
<p class="m_6764313438307663510gmail-p1"><unknown>:0: error: fatal error encountered during compilation; please file a bug report with your project and the crash log</p>
<p class="m_6764313438307663510gmail-p1"><unknown>:0: note: Broken function found, compilation aborted!</p>
<p class="m_6764313438307663510gmail-p1">0<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x000000010955ebc8 llvm::sys::PrintStackTrace(<wbr>llvm::raw_ostream&) + 40</p>
<p class="m_6764313438307663510gmail-p1">1<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x000000010955def6 llvm::sys::RunSignalHandlers() + 86</p>
<p class="m_6764313438307663510gmail-p1">2<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x000000010955f12e SignalHandler(int) + 270</p>
<p class="m_6764313438307663510gmail-p1">3<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>libsystem_platform.dylib 0x00007fffbb08cb3a _sigtramp + 26</p>
<p class="m_6764313438307663510gmail-p1">4<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>libsystem_platform.dylib 0x000070000b4115a0 _sigtramp + 1345866368</p>
<p class="m_6764313438307663510gmail-p1">5<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>libsystem_c.dylib<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x00007fffbaf11420 abort + 129</p>
<p class="m_6764313438307663510gmail-p1">6<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x00000001067985c7 swift::performFrontend(llvm::<wbr>ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*)::$_<wbr>0::__invoke(void*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) + 551</p>
<p class="m_6764313438307663510gmail-p1">7<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x0000000109506cac llvm::report_fatal_error(llvm:<wbr>:Twine const&, bool) + 252</p>
<p class="m_6764313438307663510gmail-p1">8<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x0000000109506baa llvm::report_fatal_error(char const*, bool) + 42</p>
<p class="m_6764313438307663510gmail-p1">9<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x00000001094c0d06 (anonymous namespace)::<wbr>VerifierLegacyPass::<wbr>runOnFunction(llvm::Function&) + 54</p>
<p class="m_6764313438307663510gmail-p1">10 swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x0000000109466b22 llvm::FPPassManager::<wbr>runOnFunction(llvm::Function&) + 498</p>
<p class="m_6764313438307663510gmail-p1">11 swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x00000001094663b9 llvm::legacy::<wbr>FunctionPassManagerImpl::run(<wbr>llvm::Function&) + 169</p>
<p class="m_6764313438307663510gmail-p1">12 swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x000000010946627a llvm::legacy::<wbr>FunctionPassManager::run(llvm:<wbr>:Function&) + 362</p>
<p class="m_6764313438307663510gmail-p1">13 swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x0000000106893e02 swift::<wbr>performLLVMOptimizations(<wbr>swift::IRGenOptions&, llvm::Module*, llvm::TargetMachine*) + 1410</p>
<p class="m_6764313438307663510gmail-p1">14 swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x0000000106894736 swift::performLLVM(swift::<wbr>IRGenOptions&, swift::DiagnosticEngine*, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, swift::version::Version const&, llvm::StringRef, swift::UnifiedStatsReporter*) + 1574</p>
<p class="m_6764313438307663510gmail-p1">15 swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x00000001068993c9 ThreadEntryPoint(swift::irgen:<wbr>:IRGenerator*, llvm::sys::SmartMutex<false>*, int) + 249</p>
<p class="m_6764313438307663510gmail-p1">16 swiftc <span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x0000000106899fff void* std::__1::__thread_proxy<std::<wbr>__1::tuple<std::__1::unique_<wbr>ptr<std::__1::__thread_struct, std::__1::default_delete<std::<wbr>__1::__thread_struct> >, void (*)(swift::irgen::IRGenerator*<wbr>, llvm::sys::SmartMutex<false>*, int), swift::irgen::IRGenerator*, llvm::sys::SmartMutex<false>*, int> >(void*) + 47</p>
<p class="m_6764313438307663510gmail-p1">17 libsystem_pthread.dylib<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x00007fffbb09693b _pthread_body + 180</p>
<p class="m_6764313438307663510gmail-p1">18 libsystem_pthread.dylib<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x00007fffbb096887 _pthread_body + 0</p>
<p class="m_6764313438307663510gmail-p1">19 libsystem_pthread.dylib<span class="m_6764313438307663510gmail-Apple-converted-space"> </span>0x00007fffbb09608d thread_start + 13</p>
<p class="m_6764313438307663510gmail-p1">Stack dump:</p>
<p class="m_6764313438307663510gmail-p1">0.<span class="m_6764313438307663510gmail-Apple-tab-span">        </span>Running pass 'Module Verifier' on function '@_FUNCTION_NAME_'</p><p class="m_6764313438307663510gmail-p1"><br></p><p class="m_6764313438307663510gmail-p1">Does anyone know how to turn off module verifier or fix the above error (I do not see the "-disable-llvm-verify" option with swift/swiftc command line)?</p></div></div></div>