authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-02 15:59:48-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-02 15:59:48-04:00
logc4b3c84b3f64ad3c24c2b6ad36616e10c3cf98f3
tree2a89fa5721705e77f3c5a4b27994fb07ffc61aa8
parente4edc6d118e0e0cd3510bbe89ca4a292436bb82f
signaturelock-open Commit is signed but in an unrecognized format.

zig cc: support -F and -framework


5 files changed, 35 insertions(+), 3 deletions(-)

src-self-hosted/clang_options_data.zig+17-3
......@@ -2989,7 +2989,14 @@ sepd1("fprofile-remapping-file"),
29892989flagpd1("fprofile-sample-accurate"),
29902990flagpd1("fprofile-sample-use"),
29912991flagpd1("fprofile-use"),
2992sepd1("framework"),
2992.{
2993 .name = "framework",
2994 .syntax = .separate,
2995 .zig_equivalent = .framework,
2996 .pd1 = true,
2997 .pd2 = false,
2998 .psl = false,
2999},
29933000flagpd1("freciprocal-math"),
29943001flagpd1("frecord-command-line"),
29953002flagpd1("ffree-form"),
......@@ -5670,7 +5677,14 @@ jspd1("MT"),
56705677jspd1("A"),
56715678jspd1("B"),
56725679jspd1("D"),
5673jspd1("F"),
5680.{
5681 .name = "F",
5682 .syntax = .joined_or_separate,
5683 .zig_equivalent = .framework_dir,
5684 .pd1 = true,
5685 .pd2 = false,
5686 .psl = false,
5687},
56745688jspd1("G"),
56755689jspd1("I"),
56765690jspd1("J"),
......@@ -5715,7 +5729,7 @@ joinpd1("Z"),
57155729.{
57165730 .name = "F",
57175731 .syntax = .joined_or_separate,
5718 .zig_equivalent = .other,
5732 .zig_equivalent = .framework_dir,
57195733 .pd1 = true,
57205734 .pd2 = false,
57215735 .psl = true,
src-self-hosted/stage2.zig+2
......@@ -1291,6 +1291,8 @@ pub const ClangArgIterator = extern struct {
12911291 lib_dir,
12921292 mcpu,
12931293 dep_file,
1294 framework_dir,
1295 framework,
12941296 };
12951297
12961298 const Args = struct {
src/main.cpp+6
......@@ -748,6 +748,12 @@ static int main0(int argc, char **argv) {
748748 clang_argv.append(it.other_args_ptr[i]);
749749 }
750750 break;
751 case Stage2ClangArgFrameworkDir:
752 framework_dirs.append(it.only_arg);
753 break;
754 case Stage2ClangArgFramework:
755 frameworks.append(it.only_arg);
756 break;
751757 }
752758 }
753759 // Parse linker args
src/stage2.h+2
......@@ -350,6 +350,8 @@ enum Stage2ClangArg {
350350 Stage2ClangArgLibDir,
351351 Stage2ClangArgMCpu,
352352 Stage2ClangArgDepFile,
353 Stage2ClangArgFrameworkDir,
354 Stage2ClangArgFramework,
353355};
354356
355357// ABI warning
tools/update_clang_options.zig+8
......@@ -206,6 +206,14 @@ const known_options = [_]KnownOpt{
206206 .name = "MF",
207207 .ident = "dep_file",
208208 },
209 .{
210 .name = "F",
211 .ident = "framework_dir",
212 },
213 .{
214 .name = "framework",
215 .ident = "framework",
216 },
209217};
210218
211219const blacklisted_options = [_][]const u8{};