Created by: robbertvanginkel
Tests with swift in both the test host and test target currently fail compilation with a cryptic error like
ld: library not found for -lswiftMetal for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is because the SwiftRuntimeNativeLinkable
is both dependency of the test_host_app and the tests. When linking the tests, the dependencies it shares with its test_host_app (bundle_loader
in ld) are added to a blacklist so they are not linked into the tests to prevent duplicate symbols.
However, if there's usage of swift in the tests their object files will contain linker directives to link against some wrappers around the standard library which require the flags added by SwiftRuntimeNativeLinkable
to link correctly.