facebook / facebook/buck2

CXX Custom Flavors not Picked Up

Open
#504 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.4k
Forks
394
PR merge metrics
No merged PRs in 30d

Description

Trying to cross compile with GCC, but making changes in `.buckconfig` don't seem to get picked up. I followed the examples provided on the buck2 docs [here](https://buck2.build/docs/legacy/files-and-directories/dot-buckconfig/#cxx)

`.buckconfig`:
```
[cxx#xcompile]
host_platform = linux-x86_64
cc = //arm-linux-gcc
cxx = //arm-linux-gcc
...
```

`BUCK`:
```
cxx_binary(
name = "main",
srcs = ["main.cpp"],
link_style = "static",
)
```

When I run `buck2 build :main#xcompile` I get:
```Cannot handle flavor `xcompile` on target `root//:main#xcompile`. Most flavors are unsupported in Buck2.```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.