workaround bug in the -C crate_hash option

The -C crate_hash option does not work if multiple versions of the same
crate are being linked into a binary. This can happen if different
dependencies depend on different versions of the same crate. The -C
crate_hash argument causes all versions of a given crate to have the
same crate hash which in turn causes the compiler to select the wrong
one internally and crash. This works around issue #126 for Cargo builds
but does not fix the underlying cause.
This commit is contained in:
Doug Goldstein committed 2016-12-06 11:08:46 -06:00
1 parent 65ae954a80
commit 1f18869377
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -3,6 +3,7 @@ inherit rust
DEPENDS_append = " patchelf-native"
RDEPENDS_${PN} += "${RUSTLIB_DEP}"
RUSTFLAGS += "-C crate_hash=${BB_TASKHASH}"
RUSTC_ARCHFLAGS += "-C opt-level=3 -g -L ${STAGING_DIR_HOST}/${rustlibdir}"
EXTRA_OEMAKE += 'RUSTC_ARCHFLAGS="${RUSTC_ARCHFLAGS}"'