Skip to content
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

Reduce the size of the executable file #16

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
with:
submodules: recursive
- name: Install LLVM and Clang
run: brew install llvm@18
run: |
brew install coreutils
brew install llvm@18
- name: Build
run: export PATH="/opt/homebrew/opt/llvm/bin:$PATH" && make all
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ ifeq ($(UNAME), Darwin)
endif

CFLAGS := --target=riscv64 -march=rv64imc_zba_zbb_zbc_zbs
CFLAGS += -g -Os \
-Wall -Werror -Wno-nonnull -Wno-unused-function \
-nostdinc -nostdlib \
-fdata-sections -ffunction-sections
CFLAGS += -g -Oz \
-Wall -Werror -Wno-nonnull -Wno-unused-function \
-nostdinc -nostdlib \
-fdata-sections -ffunction-sections

CFLAGS += -I deps/ckb-c-stdlib
CFLAGS += -I include -I include/c-stdlib
Expand Down Expand Up @@ -80,7 +80,8 @@ clean:
rm -f build/ckb-js-vm
rm -f build/ckb-js-vm.debug
cd tests/ckb_js_tests && make clean
make -C deps/compiler-rt-builtins-riscv clean
cd deps/compiler-rt-builtins-riscv && make clean
cd deps/musl && rm -rf obj release

STYLE := "{BasedOnStyle: Google, TabWidth: 4, IndentWidth: 4, UseTab: Never, SortIncludes: false, ColumnLimit: 120}"

Expand Down
2 changes: 1 addition & 1 deletion deps/musl
Submodule musl updated 1 files
+2 −0 ckb/build.sh