Skip to content

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

@SaigyoujiLuna

Description

@SaigyoujiLuna

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:

[package]
name = "im_rust_ts"
version.workspace = true
edition.workspace = true

[lib]
crate-type = ["cdylib"]

[dependencies]
lazy_static = { workspace = true }
log = { workspace = true }
once_cell = { workspace = true }
serde_json = { workspace = true }
serde = { workspace = true }
http = { workspace = true }
base64 = { workspace = true }
dyn-clone = { workspace = true }

napi = { workspace = true, optional = true }
napi-derive = { workspace = true, optional = true }
napi-ohos = { workspace = true, optional = true }
napi-derive-ohos = { workspace = true, optional = true }

[build-dependencies]
napi-build = { workspace = true, optional = true }
napi-build-ohos = { workspace = true, optional = true }

[profile.release]
lto = true
strip = true 

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions