maint(core): dx: support 'arch' as synonym for current architecture
- Dominant language
- Pascal
- Stars
- 534
- Forks
- 143
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 113
Description
`core/build.sh` supports `:arch` on Linux meaning "current architecture".
We should support this on mac and windows also. Something like this:
```diff
diff --git a/core/build.sh b/core/build.sh
index 08ba60bcb7..f7c55a6f8c 100755
--- a/core/build.sh
+++ b/core/build.sh
@@ -36,6 +36,7 @@ case $BUILDER_OS in
archtargets+=(
":x86 32-bit Windows (x86) build"
":x64 64-bit Windows (x64) build"
+ ":arch Windows current architecture"
)
;;
mac)
@@ -43,6 +44,7 @@ case $BUILDER_OS in
":mac Mac all architectures fat library build"
":mac-x86_64 Mac Intel build"
":mac-arm64 Mac arm64 (M1) build"
+ ":arch Mac current architecture"
)
;;
linux)
```
Then we could just run `core/build.sh test:arch` (which is the command I usually run) and it would work on linux/win/mac the same.
I'd be fine with it being a synonym, wouldn't need to generate `core/build/arch` on a mac for example.
For that matter, `arch` on linux would be better off creating `core/build/linux-$(uname -m)/…` which would be `core/build/linux-x86_64/` for example. Then `arch` remains a pseudo-target on all 3 platforms, and whatever `uname -m` returns becomes the calculated "current architecture" for linux. (x86_64, aarch64, …)
Caveat I don't really understand how the architecture selection works within build.sh so I might be talking through my hat here!
Could also have `:current` instead as an alias, which would select `:arch` on linux.
Contributor guide
Assessment
This issue has not been assessed yet.