-
Notifications
You must be signed in to change notification settings - Fork 2
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
how get the symbol file when build command is 'ohrs build --arch aarch --release -- -Z build-std=std -Z build-std-features="optimize_for_size"' #26
Comments
@richerfu Please check this issue, thanks. |
please build project without |
but I need provide my package to other team, I can not build a debug package, because it could make package size become huge |
You can remove |
These are some common solutions. [profile.release]
lto = true
strip = true
debug = true And save your debug info with $OHOS_NDK_HOME/native/llvm/bin/llvm-objcopy --only-keep-debug ./dist/arm64-v8a/libhello.so ./hello.debug In fact, this is a general solution for rust, which has nothing to do with ohos-rs itself. |
You need to save your debug info with |
I got. it could not have all debug info such as line number, and what rust code relative this asm code, which I just can relay on remaining debug info( struct name, method reference expression invoke, method signature etc. ) when compile by
right? |
Yep |
I use command below to build my project as a dylib :
ohrs build --arch aarch --release -- -Z build-std=std -Z build-std-features="optimize_for_size"
and Cargo.toml below:
When I use the output .so file as other application component, the crash occured. I try to debug it, but the lack of symbol make me debug so hard because I can not locate which line crashed by use the objdump.
The text was updated successfully, but these errors were encountered: