mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This change adds the following options to allow for greater control over the compiler's autolinking directive use: - '-disable-autolink-library': equivalent to an existing '-disable-autolink-framework', this option takes a library name as input and ensures the compiler does not produce an autolink directive '-l<library-name>'. - '-disable-autolink-frameworks': a boolean disable flag which turns off insertion of autolinking directives for all imported frameworks (of the type '-framework <framework-name>') - '-disable-all-autolinking': a boolean disable flag which turns off insertion of *any* autolinking directives. Resolves rdar://100859983
18 lines
641 B
Swift
18 lines
641 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend %s -sdk %S/Inputs -Fsystem %S/Inputs/System/Library/Frameworks -enable-objc-interop -I %S/Inputs/custom-modules -disable-all-autolinking -module-name AutolinkDisableFrameworks -emit-ir -o %t/test.ll
|
|
// RUN: cat %t/test.ll | %FileCheck %s
|
|
|
|
// Linux uses a different autolinking mechanism, based on
|
|
// swift-autolink-extract. This file tests the Darwin mechanism.
|
|
// UNSUPPORTED: autolink-extract
|
|
|
|
import LinkMusket
|
|
import LinkFramework
|
|
import ClangModuleUser
|
|
import IndirectFrameworkImporter
|
|
import UsesSubmodule
|
|
|
|
// No linker options produced
|
|
// CHECK: !llvm.linker.options = !{}
|