-
Notifications
You must be signed in to change notification settings - Fork 171
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
build: refactor install_ffmpeg.sh, add macos --> linux support #2886
Conversation
Makefile
Outdated
ifeq ($(GOARCH),arm64) | ||
LLVM_PATH ?= /opt/homebrew/opt/llvm/bin | ||
SYSROOT ?= /tmp/sysroot-aarch64-linux-gnu | ||
cgo_cflags += --target=aarch64-linux-gnu -Wno-error=unused-command-line-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.
I swear I tried 100 different methods and nothing I tried was able to get -fuse-ld=$(LLVM_PATH)/ld.lld
passed to clang
when it was running in linker mode consistently. So now we pass it to every clang
command, and -Wno-error=unused-command-line-argument
just ignores it when we're compiling rather than linking. I don't know. There's probably a better way, but no combination of -ldflags
, -extld
, -extldflags
, LDFLAGS
, and a few others was making it happen for me.
d137d4c
to
7ebd45d
Compare
.github/workflows/build.yaml
Outdated
|
||
- GOOS: linux | ||
GOARCH: arm64 | ||
runner: ubuntu-latest-m |
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.
Do you need runner
to be part of matrix
if it's always the same ubuntu-latest-m
?
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.
I'd prefer to leave it for now - in the process of doing this I needed to adjust the runners per-job quite a bit; it's entirely possible the next build we do will have to do the same thing
396853f
to
a3c6a26
Compare
This implements macOS --> Linux cross-compilation support for hacking on go-livepeer in livepeer-in-a-box.
Just M1/arm64 support for the moment. I assume the process for adding amd64 would be very similar, but I don't have one handy to test.
Specific changes:
BUILDOS
,BUILDARCH
,GOOS
, andGOARCH
. This makes it much easier to implement conditional checks later on.darwin-arm64 --> linux-arm64
compilation.