Skip to content

Commit 939f045

Browse files
committed
The built contract has symbols and is deleted using objcopy
1 parent f0b9182 commit 939f045

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

contract/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ MODE := release
1919
# we use a bash script with somes heuristics to find clang in current system.
2020
CLANG := $(shell $(TOP)/scripts/find_clang)
2121
AR := $(subst clang,llvm-ar,$(CLANG))
22+
OBJCOPY := $(subst clang,llvm-objcopy,$(CLANG))
2223
# When this is set to some value, the generated binaries will be copied over
2324
BUILD_DIR :=
2425
# Generated binaries to copy. By convention, a Rust crate's directory name will
@@ -41,6 +42,8 @@ build:
4142
for binary in $(BINARIES); do \
4243
echo "Copying binary $$binary to build directory"; \
4344
cp $(TOP)/target/riscv64imac-unknown-none-elf/$(MODE)/$$binary $(TOP)/$(BUILD_DIR); \
45+
cp $(TOP)/$(BUILD_DIR)/$$binary $(TOP)/$(BUILD_DIR)/$$binary.debug; \
46+
$(OBJCOPY) --strip-debug --strip-all $(TOP)/$(BUILD_DIR)/$$binary; \
4447
done \
4548
fi
4649

workspace/Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ members = [
1010

1111
[profile.release]
1212
overflow-checks = true
13-
strip = true
14-
codegen-units = 1
15-
16-
# This profile is used for debugging with ckb-debugger.
17-
[profile.ckb-debug]
18-
inherits = "release"
1913
strip = false
14+
codegen-units = 1
2015
debug = true
2116

2217
# TODO: Will be deleted after release

0 commit comments

Comments
 (0)