@@ -541,6 +541,7 @@ const usage_build_generic =
541
541
\\ -idirafter [dir] Add directory to AFTER include search path
542
542
\\ -isystem [dir] Add directory to SYSTEM include search path
543
543
\\ -I[dir] Add directory to include search path
544
+ \\ --embed-dir=[dir] Add directory to embed search path
544
545
\\ -D[macro]=[value] Define C [macro] to [value] (1 if [value] omitted)
545
546
\\ -cflags [flags] -- Set extra flags for the next positional C source files
546
547
\\ -rcflags [flags] -- Set extra flags for the next positional .rc source files
@@ -1287,6 +1288,8 @@ fn buildOutputType(
1287
1288
try cc_argv .appendSlice (arena , &.{ arg , args_iter .nextOrFatal () });
1288
1289
} else if (mem .eql (u8 , arg , "-I" )) {
1289
1290
try cssan .addIncludePath (arena , & cc_argv , .I , arg , args_iter .nextOrFatal (), false );
1291
+ } else if (mem .startsWith (u8 , arg , "--embed-dir=" )) {
1292
+ try cssan .addIncludePath (arena , & cc_argv , .embed_dir , arg , arg ["--embed-dir=" .len .. ], true );
1290
1293
} else if (mem .eql (u8 , arg , "-isystem" )) {
1291
1294
try cssan .addIncludePath (arena , & cc_argv , .isystem , arg , args_iter .nextOrFatal (), false );
1292
1295
} else if (mem .eql (u8 , arg , "-iwithsysroot" )) {
@@ -6974,13 +6977,17 @@ const ClangSearchSanitizer = struct {
6974
6977
m .iframeworkwithsysroot = true ;
6975
6978
if (m .iwithsysroot ) warn (wtxt , .{ dir , "iframeworkwithsysroot" , "iwithsysroot" });
6976
6979
},
6980
+ .embed_dir = > {
6981
+ if (m .embed_dir ) return ;
6982
+ m .embed_dir = true ;
6983
+ },
6977
6984
}
6978
6985
try argv .ensureUnusedCapacity (ally , 2 );
6979
6986
argv .appendAssumeCapacity (arg );
6980
6987
if (! joined ) argv .appendAssumeCapacity (dir );
6981
6988
}
6982
6989
6983
- const Group = enum { I , isystem , iwithsysroot , idirafter , iframework , iframeworkwithsysroot };
6990
+ const Group = enum { I , isystem , iwithsysroot , idirafter , iframework , iframeworkwithsysroot , embed_dir };
6984
6991
6985
6992
const Membership = packed struct {
6986
6993
I : bool = false ,
@@ -6989,6 +6996,7 @@ const ClangSearchSanitizer = struct {
6989
6996
idirafter : bool = false ,
6990
6997
iframework : bool = false ,
6991
6998
iframeworkwithsysroot : bool = false ,
6999
+ embed_dir : bool = false ,
6992
7000
};
6993
7001
};
6994
7002
0 commit comments