File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2382,7 +2382,16 @@ pub fn embedFile(
2382
2382
const zcu = pt .zcu ;
2383
2383
const gpa = zcu .gpa ;
2384
2384
2385
- if (cur_file .mod .? .deps .get (import_string )) | mod | {
2385
+ const opt_mod : ? * Module = m : {
2386
+ if (mem .eql (u8 , import_string , "std" )) break :m zcu .std_mod ;
2387
+ if (mem .eql (u8 , import_string , "root" )) break :m zcu .root_mod ;
2388
+ if (mem .eql (u8 , import_string , "builtin" )) {
2389
+ const opts = cur_file .mod .? .getBuiltinOptions (zcu .comp .config );
2390
+ break :m zcu .builtin_modules .get (opts .hash ()).? ;
2391
+ }
2392
+ break :m cur_file .mod .? .deps .get (import_string );
2393
+ };
2394
+ if (opt_mod ) | mod | {
2386
2395
const resolved_path = try std .fs .path .resolve (gpa , &.{
2387
2396
zcu .comp .cwd ,
2388
2397
mod .root .root_dir .path orelse "." ,
You can’t perform that action at this time.
0 commit comments