bazel-contrib / bazel-contrib/toolchains_llvm

Add mechanism for adding/fetching target libc++ libs for x-compile

Open
#694 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
371
Forks
283
Avg merge
1d 55m
Merged PRs (30d)
25

Description

Currently the toolchain falls back to libstdc++ for any x-compile scenarios - iiuc on the basis that the host is more likely to have that available, and the libc++ in the toolchain won't work (wrong arch)

We (envoy) are currently hitting this for downstreams that want to x-compile to arm (cf https://github.com/envoyproxy/envoy/pull/43826), and im about to add a workaround that bundles a package containing the arm libs/bins and then exposes them via a repo rule

Ideally this is something that could be handled inside toolchains_llvm directly - perhaps using some similar mechanism to how sysroot is pulled in currently

there is a related macos issue here https://github.com/bazel-contrib/toolchains_llvm/issues/386

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by examining the existing sysroot-fetching mechanism, then compare it with the Envoy workaround and related macOS issue #386; done means target-architecture libc++ libraries can be fetched and exposed for cross-compilation without falling back to host libraries.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.