-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLVM16: Clang/Wasm unable to export symbols after move to export
arg
#326
Comments
Attempt1 - No change
Attemp2 - No changeExplicitly add wasm attribute in
Attempt3 - No Change
|
Attempt4Naively use |
Attemp5 - No ChangeDecl both attributes in
|
Attempt6 - No changeCombine Attempt2 and Attempt6 |
export
arg
Turns out the apply action isn't getting inserted into contracts. A completely different issue. |
LLVM16 has changed from the CDT-LLVM fork, removing the
clang
command line optiononly-export
has been removed and replaced byexport
. Previouslyonly-export
would export the last variable/function specified. Nowexport
is additive and allows multiple variables/function to be exposed. In addition,clang
introduced thewasm-export-name
to enable exports. See Export Name Example in llvm 16.0.6 code base.You can see the errors when building the unit tests
The question is how to fix this. Couple of possibilities on what broke:
only-export
which is no longer being triggeredapply
and*:memory
by default and we need to set the right attributed for clang to do the sameexport
command line flag, and we'll either need to pass that flag everytime or somehow set the key functions to always be exported.Looking through the code CDT previous defined its own attributes for exported function
eosio_wasm_entry
andEosioWasmEntryAttr
. Here is a quick tour of the code.clang/lib/Sema/SemaDeclAttr.cpp
cdt-llvm-extensions/clang/include/clang/Basic/Attr.td
clang/lib/AST/Decl.cpp
clang/lib/CodeGen/CodeGenModule.cpp
lvmn/lib/Transforms/EosioApply/EosioApply.cpp
The text was updated successfully, but these errors were encountered: