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"),...@@ -2989,7 +2989,14 @@ sepd1("fprofile-remapping-file"),
2989flagpd1("fprofile-sample-accurate"),2989flagpd1("fprofile-sample-accurate"),
2990flagpd1("fprofile-sample-use"),2990flagpd1("fprofile-sample-use"),
2991flagpd1("fprofile-use"),2991flagpd1("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},
2993flagpd1("freciprocal-math"),3000flagpd1("freciprocal-math"),
2994flagpd1("frecord-command-line"),3001flagpd1("frecord-command-line"),
2995flagpd1("ffree-form"),3002flagpd1("ffree-form"),
...@@ -5670,7 +5677,14 @@ jspd1("MT"),...@@ -5670,7 +5677,14 @@ jspd1("MT"),
5670jspd1("A"),5677jspd1("A"),
5671jspd1("B"),5678jspd1("B"),
5672jspd1("D"),5679jspd1("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},
5674jspd1("G"),5688jspd1("G"),
5675jspd1("I"),5689jspd1("I"),
5676jspd1("J"),5690jspd1("J"),
...@@ -5715,7 +5729,7 @@ joinpd1("Z"),...@@ -5715,7 +5729,7 @@ joinpd1("Z"),
5715.{5729.{
5716 .name = "F",5730 .name = "F",
5717 .syntax = .joined_or_separate,5731 .syntax = .joined_or_separate,
5718 .zig_equivalent = .other,5732 .zig_equivalent = .framework_dir,
5719 .pd1 = true,5733 .pd1 = true,
5720 .pd2 = false,5734 .pd2 = false,
5721 .psl = true,5735 .psl = true,
src-self-hosted/stage2.zig+2
...@@ -1291,6 +1291,8 @@ pub const ClangArgIterator = extern struct {...@@ -1291,6 +1291,8 @@ pub const ClangArgIterator = extern struct {
1291 lib_dir,1291 lib_dir,
1292 mcpu,1292 mcpu,
1293 dep_file,1293 dep_file,
1294 framework_dir,
1295 framework,
1294 };1296 };
12951297
1296 const Args = struct {1298 const Args = struct {
src/main.cpp+6
...@@ -748,6 +748,12 @@ static int main0(int argc, char **argv) {...@@ -748,6 +748,12 @@ static int main0(int argc, char **argv) {
748 clang_argv.append(it.other_args_ptr[i]);748 clang_argv.append(it.other_args_ptr[i]);
749 }749 }
750 break;750 break;
751 case Stage2ClangArgFrameworkDir:
752 framework_dirs.append(it.only_arg);
753 break;
754 case Stage2ClangArgFramework:
755 frameworks.append(it.only_arg);
756 break;
751 }757 }
752 }758 }
753 // Parse linker args759 // Parse linker args
src/stage2.h+2
...@@ -350,6 +350,8 @@ enum Stage2ClangArg {...@@ -350,6 +350,8 @@ enum Stage2ClangArg {
350 Stage2ClangArgLibDir,350 Stage2ClangArgLibDir,
351 Stage2ClangArgMCpu,351 Stage2ClangArgMCpu,
352 Stage2ClangArgDepFile,352 Stage2ClangArgDepFile,
353 Stage2ClangArgFrameworkDir,
354 Stage2ClangArgFramework,
353};355};
354356
355// ABI warning357// ABI warning
tools/update_clang_options.zig+8
...@@ -206,6 +206,14 @@ const known_options = [_]KnownOpt{...@@ -206,6 +206,14 @@ const known_options = [_]KnownOpt{
206 .name = "MF",206 .name = "MF",
207 .ident = "dep_file",207 .ident = "dep_file",
208 },208 },
209 .{
210 .name = "F",
211 .ident = "framework_dir",
212 },
213 .{
214 .name = "framework",
215 .ident = "framework",
216 },
209};217};
210218
211const blacklisted_options = [_][]const u8{};219const blacklisted_options = [_][]const u8{};