| @@ -1,35 +1,44 @@ | | | @@ -1,35 +1,44 @@ |
1 | # $NetBSD: options.mk,v 1.20 2022/04/15 14:00:37 he Exp $ | | 1 | # $NetBSD: options.mk,v 1.21 2022/04/18 14:59:59 he Exp $ |
2 | | | 2 | |
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.rust | | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.rust |
4 | PKG_SUPPORTED_OPTIONS+= rust-cargo-static rust-docs | | 4 | PKG_SUPPORTED_OPTIONS+= rust-cargo-static rust-docs |
5 | | | 5 | |
6 | .include "../../mk/bsd.fast.prefs.mk" | | 6 | .include "../../mk/bsd.fast.prefs.mk" |
7 | | | 7 | |
8 | # The bundled LLVM current has issues building on SunOS. | | 8 | # The bundled LLVM current has issues building on SunOS. |
9 | .if ${OPSYS} != "SunOS" | | 9 | .if ${OPSYS} != "SunOS" |
10 | PKG_SUPPORTED_OPTIONS+= rust-llvm | | 10 | PKG_SUPPORTED_OPTIONS+= rust-llvm |
11 | # There may be compatibility issues with base LLVM. | | 11 | # There may be compatibility issues with base LLVM. |
12 | . if !empty(HAVE_LLVM) | | 12 | . if !empty(HAVE_LLVM) |
13 | PKG_SUGGESTED_OPTIONS+= rust-llvm | | 13 | PKG_SUGGESTED_OPTIONS+= rust-llvm |
14 | . endif | | 14 | . endif |
15 | .endif | | 15 | .endif |
16 | | | 16 | |
17 | # Bundle OpenSSL and curl into the cargo binary when producing | | 17 | # Bundle OpenSSL and curl into the cargo binary when producing |
18 | # bootstraps on NetBSD. | | 18 | # bootstraps on NetBSD. |
19 | .if ${OPSYS} == "NetBSD" && ${BUILD_TARGET} == "dist" | | 19 | .if ${OPSYS} == "NetBSD" && ${BUILD_TARGET} == "dist" |
20 | PKG_SUGGESTED_OPTIONS+= rust-cargo-static | | 20 | PKG_SUGGESTED_OPTIONS+= rust-cargo-static |
21 | .endif | | 21 | .endif |
22 | | | 22 | |
| | | 23 | # (NetBSD)/sparc64 systems fail to build libunwind 13.0.1, |
| | | 24 | # and libunwind is depended on here unless rust-llvm is turned |
| | | 25 | # on. The latter succeeds, though. So default to using |
| | | 26 | # rust-llvm on NetBSD/sparc64. |
| | | 27 | # Ref. PR#56791 |
| | | 28 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) |
| | | 29 | PKG_SUGGESTED_OPTIONS+= rust-llvm |
| | | 30 | .endif |
| | | 31 | |
23 | .include "../../mk/bsd.options.mk" | | 32 | .include "../../mk/bsd.options.mk" |
24 | | | 33 | |
25 | # | | 34 | # |
26 | # Use the internal copy of LLVM or the external one? | | 35 | # Use the internal copy of LLVM or the external one? |
27 | # The internal one contains some extra optimizations. | | 36 | # The internal one contains some extra optimizations. |
28 | # | | 37 | # |
29 | .if empty(PKG_OPTIONS:Mrust-llvm) | | 38 | .if empty(PKG_OPTIONS:Mrust-llvm) |
30 | BUILDLINK_API_DEPENDS.llvm+= llvm>=12.0.0 | | 39 | BUILDLINK_API_DEPENDS.llvm+= llvm>=12.0.0 |
31 | .include "../../lang/libunwind/buildlink3.mk" | | 40 | .include "../../lang/libunwind/buildlink3.mk" |
32 | .include "../../lang/llvm/buildlink3.mk" | | 41 | .include "../../lang/llvm/buildlink3.mk" |
33 | CONFIGURE_ARGS+= --enable-llvm-link-shared | | 42 | CONFIGURE_ARGS+= --enable-llvm-link-shared |
34 | #CONFIGURE_ARGS+= --llvm-libunwind=system | | 43 | #CONFIGURE_ARGS+= --llvm-libunwind=system |
35 | CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm} | | 44 | CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm} |