This is an archive of the discontinued LLVM Phabricator instance.

tsan: allow to cross-build Go runtime
ClosedPublic

Authored by dvyukov on May 16 2023, 2:28 AM.

Details

Summary

Allow user to provide target GOOS/GOARCH.
If not provided, use the host GOOS/GOARCH as we do now.
This allows to cross-compile the runtime.
Also provide SKIP_TEST knob for cross-compilation
since the test will most likely not run on host.

Diff Detail

Event Timeline

dvyukov created this revision.May 16 2023, 2:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2023, 2:28 AM
dvyukov requested review of this revision.May 16 2023, 2:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2023, 2:28 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
chressie added inline comments.
compiler-rt/lib/tsan/go/buildgo.sh
105

nit: drop this line

dvyukov updated this revision to Diff 522532.May 16 2023, 4:06 AM

removed SUFFIX= line

dvyukov marked an inline comment as done.May 16 2023, 4:07 AM
vitalybuka accepted this revision.May 16 2023, 3:43 PM
This revision is now accepted and ready to land.May 16 2023, 3:43 PM
This revision was landed with ongoing or failed builds.May 17 2023, 12:31 AM
This revision was automatically updated to reflect the committed changes.
dyung added a subscriber: dyung.May 17 2023, 1:11 AM

This change is failing to build on at least one buildbot https://lab.llvm.org/buildbot/#/builders/247/builds/4603

I think the problem is that == is not a valid comparison operator in sh. I believe it should be = instead of ==.

Sent https://reviews.llvm.org/D150760 to fix it. Thanks for reporting.