Commit 127d999
Give CinderX's vendored
Summary:
CinderX vendors its own copy of `asmjit`, while APF/Torch can also pull in `fbsource//third-party/asmjit:asmjit` through `//caffe2:_torch` and FBGEMM. The APF blame task `T277711004` showed `cxx_link_python_exe` failures such as `fbcode//apf/plugin/tests:no_op_gpu_tracer_test`, where `//apf/plugin:no_op_gpu_tracer` depends on `:interfaces`, `interfaces.py` imports `torch`, `:interfaces` depends on `//caffe2:_torch`, and FBGEMM exports the repo-level `asmjit`. After `D109607577`, CinderX `code_allocator.cpp` calls the new out-of-line `CodeHolder::ensureBranchStubIslands()` method, which forced the CinderX vendored `asmjit` archive to contribute `codeholder.cpp.pic.o` during links that already included the repo-level `asmjit` archive. Both copies used the default `asmjit::_abi_1_13` inline namespace, so the linker saw duplicate definitions for `asmjit::_abi_1_13::CodeHolder` methods.
Change only the CinderX vendored default `ASMJIT_ABI_NAMESPACE` to `_cinderx_abi_1_13`. AsmJit explicitly supports overriding this namespace for projects that embed multiple copies, and this keeps CinderX symbols distinct from the repo-level third-party `asmjit` symbols while preserving CinderX source compatibility through the inline namespace.
Reviewed By: Yhg1s
Differential Revision: D110116689
fbshipit-source-id: 7308cd6f40216ec6d63d76ba8a6af3400f1baf8easmjit a private ABI namespace1 parent 588af0f commit 127d999
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments