7272 add_packages("cmdline")
7373 add_includedirs("src/libs/json")
7474 set_policy("build.c++.modules", true)
75+ -- Static link libc++ for minimal runtime dependencies
76+ add_ldflags("-static-libstdc++", {force = true})
77+ add_cxxflags("-stdlib=libc++", {force = true})
78+ add_ldflags("-stdlib=libc++", {force = true})
7579 EOF
7680 fi
7781
@@ -84,16 +88,20 @@ jobs:
8488 run : |
8589 MCPP=$(find build -name mcpp -type f -perm +111 | head -1)
8690 test -x "$MCPP"
91+ echo "=== file ==="
8792 file "$MCPP"
93+ echo "=== otool -L (dynamic deps) ==="
94+ otool -L "$MCPP"
95+ echo "=== version ==="
8896 "$MCPP" --version
8997 echo "MCPP=$MCPP" >> "$GITHUB_ENV"
9098
9199 - name : Package
92100 id : package
93101 run : |
94102 VERSION=$(awk -F '"' '/^version[[:space:]]*=/{print $2; exit}' mcpp.toml)
95- TARBALL="mcpp-${VERSION}-darwin -arm64.tar.gz"
96- WRAPPER="mcpp-${VERSION}-darwin -arm64"
103+ TARBALL="mcpp-${VERSION}-macosx -arm64.tar.gz"
104+ WRAPPER="mcpp-${VERSION}-macosx -arm64"
97105
98106 mkdir -p "dist/$WRAPPER/bin"
99107 cp "$MCPP" "dist/$WRAPPER/bin/mcpp"
@@ -126,13 +134,13 @@ jobs:
126134 SMOKE=$(mktemp -d)
127135 tar -xzf "${{ steps.package.outputs.tarball }}" -C "$SMOKE"
128136 VERSION="${{ steps.package.outputs.version }}"
129- "$SMOKE/mcpp-${VERSION}-darwin -arm64/bin/mcpp" --version
130- "$SMOKE/mcpp-${VERSION}-darwin -arm64/mcpp" --version
137+ "$SMOKE/mcpp-${VERSION}-macosx -arm64/bin/mcpp" --version
138+ "$SMOKE/mcpp-${VERSION}-macosx -arm64/mcpp" --version
131139
132140 - name : Upload artifact
133141 uses : actions/upload-artifact@v4
134142 with :
135- name : mcpp-darwin -arm64
143+ name : mcpp-macosx -arm64
136144 path : |
137- dist/mcpp-*-darwin -arm64.tar.gz
138- dist/mcpp-*-darwin -arm64.tar.gz.sha256
145+ dist/mcpp-*-macosx -arm64.tar.gz
146+ dist/mcpp-*-macosx -arm64.tar.gz.sha256
0 commit comments