-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
llvm: set PIE only for executables #17597
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
Conversation
|
Shouldn't |
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.
missing error when the user specifies -fpie for a non-executable
ha I actually had that done and took it out. Do we also want to error for |
|
no |
andrewrk
left a comment
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.
keep it simple:
const pie: bool = pie: {
if (options.output_mode != .Exe) {
if (options.want_pie == true) return error.OutputModeForbidsPie;
break :pie false;
}
if (target_util.requiresPIE(options.target)) {
if (options.want_pie == false) return error.TargetRequiresPie;
break :pie true;
}
if (tsan) {
if (options.want_pie == false) return error.TsanRequiresPie;
break :pie true;
}
if (options.want_pie) |want_pie| {
break :pie want_pie;
}
break :pie false;
};|
Looks good, thanks! |
|
This change appears to break the thread sanitizer even further: |
This was missed in ziglang#17597 .
#17653 should fix it |
closes #17575