How do you conditionally compile based on a target triple?

410 Views Asked by At

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].

1

There are 1 best solutions below

0
Isaac van Bakel On

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.