Is it possible to conditionally compile for a specific target triple? I’m having issues with excluding the x86_64-rumprun-netbsd
target without simply excluding netbsd
with a #[cfg]
.
Asked
Active
Viewed 308 times
-1

Shepmaster
- 388,571
- 95
- 1,107
- 1,366

Josh Abraham
- 959
- 1
- 8
- 18
-
I believe your question is answered by the answers of [Is there a list of all cfg features?](https://stackoverflow.com/q/41742046/155423). If you disagree, please [edit] your question to explain the differences. Otherwise, we can mark this question as already answered. – Shepmaster Oct 13 '18 at 15:58
-
TL;DR the duplicate: no, there is no `cfg` for the target triple. – Shepmaster Oct 13 '18 at 15:58
-
See also [How to get executable's full target triple as a compile-time constant without using a build script?](https://stackoverflow.com/q/48967583/155423). – Shepmaster Oct 13 '18 at 15:59
-
@Shepmaster it looks like the target_vendor configuration might be useful for me. But there is no list of valid target_vendors – Josh Abraham Oct 13 '18 at 17:00
1 Answers
0
You want to use the target_vendor
configuration, which has a value for rumprun
as described in this PR. In general, you can use any of the target vendors from this page, as described in this PR.

Isaac van Bakel
- 1,772
- 10
- 22