<div dir="ltr">I&#39;ve been trying to look if there&#39;s a way with swift build or swiftc itself to disable objective-c interoperability. I&#39;ve gotten as far as inspecting the IR output with the disable-obc-interop flag with this command<div><br></div><div>swiftc -emit-ir -Xfrontend -disable-llvm-optzns -Xfrontend -disable-objc-interop -O Sources/main.swift <br></div><div><br></div><div>But I haven&#39;t been able to figure out if there&#39;s a way to do this with swift build. No matter what I do when I inspect the compiled binary</div><div><br></div><div><div>otool -L .build/debug/Test</div><div>.build/debug/Hello:</div><div><span class="" style="white-space:pre">        </span>/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)</div><div><span class="" style="white-space:pre">        </span>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)</div><div><span class="" style="white-space:pre">        </span>@rpath/libswiftCore.dylib (compatibility version 0.0.0, current version 0.0.0)</div></div><div><br></div><div>libobjc is always linked in. I ran the emit-ir command above both with and without disable-obc-interop and could see in the emitted IR that this line was removed when using the disable-obc-interop flag</div><div><br></div><div>!7 = !{!&quot;-lobjc&quot;}<br></div><div><br></div><div>Is there something I&#39;m missing or is this just not supported currently? I don&#39;t have a practical use case currently for this but was just curious to better understand the swift runtime and internals.</div><div><br></div><div>Thanks,</div><div>Scott Knight</div></div>