diff options
author | 2022-08-01 15:16:17 -0700 | |
---|---|---|
committer | 2022-08-01 15:16:17 -0700 | |
commit | 85c4c25bc2a0a71e9075933f92221781f40fc93a (patch) | |
tree | 27590c3ec9cc90cc457b4c5b9cf0afc2ed93f566 /src | |
parent | 35bd08f7d77c5668dfffe5d3fcae262d1ba10317 (diff) | |
download | bun-85c4c25bc2a0a71e9075933f92221781f40fc93a.tar.gz bun-85c4c25bc2a0a71e9075933f92221781f40fc93a.tar.zst bun-85c4c25bc2a0a71e9075933f92221781f40fc93a.zip |
Use WebKit LTO builds where appropriate
Diffstat (limited to 'src')
m--------- | src/bun.js/WebKit | 0 | ||||
-rw-r--r-- | src/cli/install.sh | 16 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/bun.js/WebKit b/src/bun.js/WebKit -Subproject ae3c6f3fd24fc10da1ea124dbba0d188dcf46c9 +Subproject 4d6ee41032866e63aa43ba007616c632ed1c90a diff --git a/src/cli/install.sh b/src/cli/install.sh index 096ff7917..9218c51ad 100644 --- a/src/cli/install.sh +++ b/src/cli/install.sh @@ -29,7 +29,7 @@ if [[ -t 1 ]]; then # Bold Bold_Green='\033[1;32m' # Bold Green - Bold_White='\033[1m' # Bold White + Bold_White='\033[1m' # Bold White fi error() { @@ -79,9 +79,21 @@ if [[ $target = darwin-x64 ]]; then fi fi - github_repo="https://github.com/oven-sh/bun" +if [[ $target = darwin-x64 ]]; then + # If AVX2 isn't supported, use the -baseline build + if [[ $(sysctl -n machdep.cpu.features) != *avx2* ]]; then + target=darwin-x64-baseline + fi +fi + +if [[ $target = linux-x64 ]]; then + # If AVX2 isn't supported, use the -baseline build + if [[ $(cat /proc/cpuinfo | grep avx2) = '' ]]; then + target=linux-x64-baseline + fi +fi if [[ $# = 0 ]]; then bun_uri=$github_repo/releases/latest/download/bun-$target.zip |