Skip to content

Commit 6393e7a

Browse files
committed
Zig update: target.isArm now returns true for thumb
ref ziglang/zig#21599 Closes Vexu#779
1 parent 22bb0eb commit 6393e7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/aro/Driver.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ pub fn getPICMode(d: *Driver, lastpic: []const u8) !struct { backend.CodeGenOpti
10771077
return .{ if (pic) .two else .none, false };
10781078
}
10791079

1080-
const embedded_pi_supported = target.cpu.arch.isArmOrThumb();
1080+
const embedded_pi_supported = target.cpu.arch.isArm();
10811081
if (!embedded_pi_supported) {
10821082
if (d.ropi) try d.unsupportedOptionForTarget(target, "-fropi");
10831083
if (d.rwpi) try d.unsupportedOptionForTarget(target, "-frwpi");

src/aro/toolchains/Linux.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn buildExtraOpts(self: *Linux, tc: *const Toolchain) !void {
4040
self.extra_opts.appendAssumeCapacity("relro");
4141
}
4242

43-
if (target.cpu.arch.isARM() or target.cpu.arch.isAARCH64() or is_android) {
43+
if ((target.cpu.arch.isArm() and !target.cpu.arch.isThumb()) or target.cpu.arch.isAARCH64() or is_android) {
4444
try self.extra_opts.ensureUnusedCapacity(gpa, 2);
4545
self.extra_opts.appendAssumeCapacity("-z");
4646
self.extra_opts.appendAssumeCapacity("max-page-size=4096");

0 commit comments

Comments
 (0)