Skip to content

Commit 8f2f097

Browse files
committed
Frontend: address some late comments from Jordan
Move the option definition into FrontendOptions.td as it no longer can be passed to the driver. Use the single-dash separate form for the argument which is more uniform with the rest of the options (and is arguably aesthetically more pleasing). NFC.
1 parent a0f1a53 commit 8f2f097

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/swift/Option/FrontendOptions.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ def print_clang_stats : Flag<["-"], "print-clang-stats">,
108108
def serialize_debugging_options : Flag<["-"], "serialize-debugging-options">,
109109
HelpText<"Always serialize options for debugging (default: only for apps)">;
110110

111+
def autolink_library : Separate<["-"], "autolink-library">,
112+
HelpText<"Add dependent library">, Flags<[FrontendOption]>;
113+
111114
} // end let Flags = [FrontendOption, NoDriverOption]
112115

113116
def debug_crash_Group : OptionGroup<"<automatic crashing options>">;

include/swift/Option/Options.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,6 @@ def Xlinker : Separate<["-"], "Xlinker">,
272272
Flags<[DoesNotAffectIncrementalBuild]>,
273273
HelpText<"Specifies an option which should be passed to the linker">;
274274

275-
def autolink_library : Joined<["-"], "autolink-library=">,
276-
HelpText<"Add dependent library">, Flags<[FrontendOption]>;
277-
278275
// Optimization levels
279276

280277
def O_Group : OptionGroup<"<optimization level options>">;

test/IRGen/dependent-library.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -target i686-unknown-windows-msvc -emit-ir -parse-as-library -parse-stdlib -module-name dependent -autolink-library=oldnames -autolink-library=msvcrt %s -o - | FileCheck %s
1+
// RUN: %swift -target i686-unknown-windows-msvc -emit-ir -parse-as-library -parse-stdlib -module-name dependent -autolink-library oldnames -autolink-library msvcrt %s -o - | FileCheck %s
22

33
// CHECK: !{i32 6, !"Linker Options", ![[options:[0-9]+]]}
44
// CHECK: ![[options]] = !{![[oldnames:[0-9]+]], ![[msvcrtd:[0-9]+]]}

0 commit comments

Comments
 (0)