Skip to content
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

Make Bazel-built binaries fully static #944

Closed
daviddrysdale opened this issue May 4, 2020 · 1 comment
Closed

Make Bazel-built binaries fully static #944

daviddrysdale opened this issue May 4, 2020 · 1 comment

Comments

@daviddrysdale
Copy link
Contributor

#864 moved binaries built with Cargo to be fully statically linked, based on the musl library. However, this does not affect binaries built with Bazel, which still depend on (e.g.) dynamic linking of libc at runtime:

% ldd ./bazel-clang-bin/oak/server/rust/oak_loader/oak_loader
	linux-vdso.so.1 (0x00007ffddab22000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0b61eda000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0b61ecf000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0b61eae000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0b61e94000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0b61cd4000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0b62bff000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0b61b8f000)
@daviddrysdale
Copy link
Contributor Author

#1016 moves the server-side build to be pure-Carg (no Bazel) and so static builds happen by using the --target=x86_64-unknown-linux-musl flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant