Files
swift-mirror/test/Interpreter/lto_static_lib.swift
Arnold Schwaighofer 8f7e433c71 Fix LTO test to use just use libLTO.dylib
This is necessary until the Xcode toolchain's libLTO.dylib supports opaque pointers
2023-06-14 10:49:50 -07:00

18 lines
516 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift -parse-as-library -lto=llvm-thin %s -emit-bc -o %t/a.o %lto_flags
// RUN: %use_just_built_liblto ar -r -s %t/archive.a %t/a.o
// RUN: %use_just_built_liblto %target-clang %t/archive.a -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main
// RUN: %target-run %t/main | %FileCheck %s
// REQUIRES: executable_test
// REQUIRES: OS=macosx
// REQUIRES: no_asan
@_cdecl("main")
func main() -> Int {
print("Hello!")
return 0
}
// CHECK: Hello!