Skip to content

Commit 690fafc

Browse files
foxnneemidoots
authored andcommittedNov 12, 2024·
update.sh: Add generation for MACHWindowDelegate.m
1 parent bad80e1 commit 690fafc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
 

‎update.sh

+28
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,31 @@ done
9494

9595
mv MACHAppDelegate_aarch64-macos.s MACHAppDelegate_arm64_apple_macos12.s
9696
mv MACHAppDelegate_x86_64-macos.s MACHAppDelegate_x86_64_apple_macos12.s
97+
98+
for pair in \
99+
'MACHWindowDelegate_aarch64-macos.s aarch64-macos.12.0' \
100+
'MACHWindowDelegate_x86_64-macos.s x86_64-macos.12.0'
101+
do
102+
dst=${pair%% *}
103+
target=${pair#* }
104+
105+
zig cc -c MACHWindowDelegate.m \
106+
-target "$target" \
107+
-S -Os -fomit-frame-pointer -fobjc-arc -fno-objc-exceptions \
108+
-o "$dst" \
109+
-iframework ./xcode-frameworks/Frameworks \
110+
-isystem ./xcode-frameworks/include
111+
112+
cat "$dst" |
113+
sed 's/\x01/\\x01/g' |
114+
sed 's/ *; .*//g' | # Strip comments at the end of lines
115+
sed 's/ *## .*//g' |
116+
sed '/^ \.build_version .*/d' | # Strip OS-specific version info
117+
sed '/^; .*/d' | # Strip whole-line comments
118+
sed '/^## .*/d' > "$dst.tmp"
119+
120+
mv "$dst.tmp" "$dst"
121+
done
122+
123+
mv MACHWindowDelegate_aarch64-macos.s MACHWindowDelegate_arm64_apple_macos12.s
124+
mv MACHWindowDelegate_x86_64-macos.s MACHWindowDelegate_x86_64_apple_macos12.s

0 commit comments

Comments
 (0)
Please sign in to comment.