boklm pushed to branch main at The Tor Project / Applications / 
tor-browser-build


Commits:
9e702e7a by Nicolas Vigier at 2026-01-29T10:33:24+01:00
Bug 41705: Remove unnecessary workaround in projects/go/build

A workaround for https://github.com/golang/go/issues/15457 was added a
long time ago, but is not necessary anymore.

- - - - -


1 changed file:

- projects/go/build


Changes:

=====================================
projects/go/build
=====================================
@@ -22,26 +22,12 @@ cd /var/tmp/dist/go/src
 [% IF c("var/linux") -%]
   ./make.bash
 [% ELSIF c("var/macos") -%]
-  unset LDFLAGS
   rm -Rf $clangdir/helpers
-  export CC="$clangdir/bin/clang [% c('var/FLAGS') %]"
-  # Create a cc-for-target script that closes over CC, CFLAGS, and LDFLAGS.
-  # Go's CC_FOR_TARGET only allows a command name, not a command with 
arguments.
-  # https://github.com/golang/go/issues/15457
-  CC_FOR_TARGET="$(pwd)/cc-for-target"
-  echo "#!/bin/sh" > "$CC_FOR_TARGET"
-  echo "exec $CC \"\$@\"" >> "$CC_FOR_TARGET"
-  chmod +x "$CC_FOR_TARGET"
-  CGO_ENABLED=1 CC_FOR_TARGET="$CC_FOR_TARGET" CC= CFLAGS= LDFLAGS= ./make.bash
+  CGO_ENABLED=1 CC_FOR_TARGET="$clangdir/bin/clang [% c('var/FLAGS') %]" \
+    CC= CFLAGS= LDFLAGS= ./make.bash
 [% ELSIF c("var/windows") -%]
-  # Create a cc-for-target script that closes over CC, CFLAGS, and LDFLAGS.
-  # Go's CC_FOR_TARGET only allows a command name, not a command with 
arguments.
-  # https://github.com/golang/go/issues/15457
-  CC_FOR_TARGET="$(pwd)/cc-for-target"
-  echo "#!/bin/sh" > "$CC_FOR_TARGET"
-  echo "exec [% c("arch") %]-w64-mingw32-cc [% c("var/CFLAGS") %] [% 
c("var/LDFLAGS") %] \"\$@\"" >> "$CC_FOR_TARGET"
-  chmod +x "$CC_FOR_TARGET"
-  CGO_ENABLED=1 CC_FOR_TARGET="$CC_FOR_TARGET" CC= CFLAGS= LDFLAGS= ./make.bash
+  CC_FOR_TARGET='[% c("arch") %]-w64-mingw32-cc [% c("var/CFLAGS") %] [% 
c("var/LDFLAGS") %]' \
+    CGO_ENABLED=1 CC= CFLAGS= LDFLAGS= ./make.bash
 [% ELSIF c("var/android") -%]
   CGO_ENABLED=1 CC_FOR_TARGET=[% c("var/CC") %] CC= CFLAGS= LDFLAGS= 
./make.bash
 [% END -%]



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/9e702e7a7b372f4d40c9cfd4748ae87c9316d258

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/9e702e7a7b372f4d40c9cfd4748ae87c9316d258
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tor-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to