summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-08-10 11:11:18 -0700
committerCliff Click <cliffc@acm.org>2026-11-12 13:48:30 -0800
commit74dba15abb33dd9deb899c434d5b3b189dd5fb8b (patch)
tree80ccea2024d576a4fb14dd533a222956296fe473 /Makefile
parent7a02c1425336a8bd4494a9a39ca2d2fdb98fd73f (diff)
downloadSimple-74dba15abb33dd9deb899c434d5b3b189dd5fb8b.tar.gz
Simple-74dba15abb33dd9deb899c434d5b3b189dd5fb8b.zip
Chapter 28a: Modules and Lazy Class Initialization
Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: fuhsnn <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: Symious <14933944+symious@users.noreply.github.com> Co-authored-by: Jun Kawasaki <jun784@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 406275dc..08a5fcde 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
# Build from this chapter directory; make libs/init prepares the offline cache.
USE_ISA := 1
-EXTRA_TESTS := com.seaofnodes.simple.codegen.X86EncodingTest
include $(firstword $(wildcard ../build-support/java.mk build-support/java.mk))
# Native allocation statistics, introduced with register allocation.
@@ -8,3 +7,15 @@ include $(firstword $(wildcard ../build-support/java.mk build-support/java.mk))
spill-stats: $(test_classes)
@mkdir -p build/objs
@$(JVM) com.seaofnodes.simple.SpillStats
+
+# The ABI shim gives standalone native tests the same entry contract as clients.
+CPU_PORT := x86_64_v2
+CALL_CONV := $(if $(filter Windows_NT,$(OS)),win64,SystemV)
+CPU_ABI := $(CPU_PORT)_$(CALL_CONV)
+RELEASE := build/release
+RELEASE_CRT := $(RELEASE)/$(CPU_ABI)/simple_crt.o
+C_CALL_CONV := $(if $(filter win64,$(CALL_CONV)),ms_abi,sysv_abi)
+$(RELEASE_CRT): src/main/c/simple_crt.c Makefile
+ @mkdir -p $(dir $@)
+ @gcc -c -O2 -DCALL_CONV=$(C_CALL_CONV) -o $@ $<
+tests release spill-stats: $(RELEASE_CRT)