-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nix/Darwin NativePaths: Nix ignore -F flags and .tbl files #19880
base: master
Are you sure you want to change the base?
Conversation
lib/std/zig/system/NativePaths.zig
Outdated
@@ -33,6 +33,10 @@ pub fn detect(arena: Allocator, native_target: std.Target) !NativePaths { | |||
break; | |||
}; | |||
try self.addFrameworkDir(framework_path); | |||
} else if (mem.startsWith(u8, word, "-F")) { | |||
// Ignore this argument. | |||
// Nix provides the same framework path through -iframework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no harm in including duplicated paths, and it's strictly safer than outright ignoring -F
arg. What if suddenly the sets are disjoint between everything passed via -iframework
and -F
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid point. I updated the PR to include that path instead of ignore it
lib/std/zig/system/NativePaths.zig
Outdated
@@ -67,6 +71,8 @@ pub fn detect(arena: Allocator, native_target: std.Target) !NativePaths { | |||
try self.addRPath(lib_path); | |||
} else if (mem.startsWith(u8, word, "-l")) { | |||
// Ignore this argument. | |||
} else if (mem.endsWith(u8, word, ".tbd")) { | |||
// Ignore this argument. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be ignored, and actually handled in the linker. tbd
is a textualised format for a dylib on macOS and skipping those may result in unexpected link failures.
8ca42c7
to
9c6d2fb
Compare
9c6d2fb
to
e27972b
Compare
@kubkon - Thanks for the review. I addressed your comments and rebased. |
Suggested fix for #19879