Files
swift-mirror/test/LinkerSections/function_sections.swift
Alex Suhan eed6a4eb94 Expose function sections option (#28088)
* Expose separate function sections option to compiler

* Add function sections test
2020-01-13 14:45:01 -08:00

11 lines
628 B
Swift

// REQUIRES: OS=linux-gnu || OS=linux-androideabi || OS=linux-android || OS=freebsd
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -Xfrontend -function-sections -emit-module -emit-library -static -parse-stdlib %S/Inputs/FunctionSections.swift
// RUN: %target-build-swift -Xlinker --gc-sections -Xlinker -Map=%t/../../FunctionSections.map -I%t/../.. -L%t/../.. -lFunctionSections %S/Inputs/FunctionSectionsUse.swift
// RUN: %FileCheck %s < %t/../../FunctionSections.map
// CHECK: Discarded input sections
// CHECK: .text.$s16FunctionSections5func2yyF
// CHECK: Memory map
// CHECK: .text.$s16FunctionSections5func1yyF