BR-SW / iree_samples

samples for internal usage, not production code
Apache License 2.0
0 stars 0 forks source link

`static_library_demo` for `rv64im, lp64` #1

Open gglin001 opened 8 months ago

gglin001 commented 8 months ago

check ar_static_library_demo_v0.zip

ls -l 
total 2016
-rwxr-xr-x 1 root root 1020976 Mar  6 09:27 static_library_demo
-rwxr-xr-x 1 root root 1033912 Mar  6 09:27 static_library_demo_c
-rw-r--r-- 1 root root     345 Mar  6 09:28 t.sh
# file static_library_demo 
static_library_demo: ELF 64-bit LSB executable, UCB RISC-V, soft-float ABI, version 1 (SYSV), statically linked, with debug_info, not stripped
# file static_library_demo_c
static_library_demo_c: ELF 64-bit LSB executable, UCB RISC-V, soft-float ABI, version 1 (SYSV), statically linked, with debug_info, not stripped

qemu run

qemu-riscv64 \
  -cpu rv64 \
  static_library_demo
# static_library_run_bytecode passed

qemu-riscv64 \
  -cpu rv64 \
  static_library_demo_c
# static_library_run_c passed
gglin001 commented 8 months ago

built with https://github.com/BR-SW/iree-internal/tree/e474723e8e734072aaaacb27ce68cf477436912b/samples/static_library https://github.com/BR-SW/iree-internal/blob/e474723e8e734072aaaacb27ce68cf477436912b/t20.rv64im.build.sh#L17