Open 50U10FCA7 opened 1 year ago
This works for me with:
[profile.dev]
incremental = false
[profile.release]
codegen-units = 1
Still unclear why this problem appears, but linkme
crate has the same issue: https://github.com/50U10FCA7/inventory_issue_test/runs/8305029222?check_suite_focus=true#step:4:24
Looks like problem with linkage on macOS.
It would be an appropriate use of panic to include static assertions that check the CARGOPROFILE
[profile.dev] incremental = false [profile.release] codegen-units = 1
This is definitely not working for me. Only some instances of inventory::submit!
are being picked up even if I blow away the target directory.
$ uname -rv
uname -rv
18.7.0 Darwin Kernel Version 18.7.0: Tue Jun 22 19:37:08 PDT 2021; root:xnu-4903.278.70~1/RELEASE_X86_64
$ ld -v
@(#)PROGRAM:ld PROJECT:ld64-530
BUILD 18:57:17 Dec 13 2019
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 11.0.0, (clang-1100.0.33.17) (static support for 23, runtime is 23)
TAPI support using: Apple TAPI version 11.0.0 (tapi-1100.0.11)
$ rustc --version
rustc 1.72.0-nightly (fe7454bf4 2023-06-19)
$ grep -A2 -F '[profile.' Cargo.toml
[profile.dev]
incremental = false
--
[profile.release]
codegen-units = 1
$
Been trying to figure this out as well, but I haven't ever gotten it to report anything but empty results so far. Also, the codegen units fix doesn't seem to work in my case either.
I saw this problem for 0.3 and the following did fix it for me, at least for tests.
[profile.dev]
incremental = false
Inventory stops collecting anything on MacOS in some cases. Think it's because of fn pointers inside plugin, but not sure.
Here's MRE (see GitHub actions): https://github.com/50U10FCA7/inventory_issue_test