Skip to content

Commit 9755673

Browse files
committed
ci: gitly, vpm fixes
1 parent f17389c commit 9755673

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/v_apps_and_modules_compile_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
## echo "Build Gitly with -autofree"
142142
## v -cc gcc -autofree /tmp/gitly
143143
echo "Compile gitly.css from gitly.scss"
144-
sassc /tmp/gitly/static/static/css/gitly.scss > /tmp/gitly/static/static/css/gitly.css
144+
sassc /tmp/gitly/static/css/gitly.scss > /tmp/gitly/static/css/gitly.css
145145
# echo "Run first_run.v"
146146
# v -cc gcc run /tmp/gitly/tests/first_run.v
147147
# # /tmp/gitly/gitly -ci_run

vlib/v/util/util.v

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,15 @@ fn tool_recompilation_args(tool_name string, user_os string) []string {
8181
// FreeBSD's default tcc setup can not compile vdoc reliably.
8282
return ['-cc', 'cc']
8383
}
84-
if tool_name == 'vpm' {
84+
if tool_name == 'vpm' && user_os == 'macos' {
8585
// vpm performs HTTPS requests against the package registry, so it
8686
// pulls in the TLS layer. Build it against OpenSSL instead of the
8787
// bundled mbedtls: tcc miscompiles mbedtls big-int routines on
8888
// Apple Silicon, which causes TLS handshakes to spin forever in
8989
// mbedtls_mpi_sub_abs / ecp_modp (e.g. `v install sdl` would hang).
90+
// Restricted to macOS: musl-based Linux builds lack the glibc
91+
// headers OpenSSL pulls in (e.g. `sys/cdefs.h`), so forcing it
92+
// there breaks `v install` in the docker-ubuntu-musl CI.
9093
return ['-d', 'use_openssl']
9194
}
9295
return []string{}

vlib/v/util/util_test.v

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ fn test_tool_recompilation_args_force_system_cc_for_vdoc_on_freebsd() {
1010

1111
fn test_tool_recompilation_args_use_openssl_for_vpm() {
1212
assert tool_recompilation_args('vpm', 'macos') == ['-d', 'use_openssl']
13-
assert tool_recompilation_args('vpm', 'linux') == ['-d', 'use_openssl']
14-
assert tool_recompilation_args('vpm', 'windows') == ['-d', 'use_openssl']
1513
}
1614

1715
fn test_tool_recompilation_args_do_not_change_other_tools_or_platforms() {
1816
assert tool_recompilation_args('vfmt', 'freebsd').len == 0
1917
assert tool_recompilation_args('vdoc', 'linux').len == 0
18+
// musl-gcc on docker-ubuntu-musl can't find glibc's sys/cdefs.h that
19+
// OpenSSL pulls in, so the `-d use_openssl` workaround is restricted to
20+
// macOS where the original tcc/Apple-Silicon bug was reported.
21+
assert tool_recompilation_args('vpm', 'linux').len == 0
22+
assert tool_recompilation_args('vpm', 'windows').len == 0
2023
}
2124

2225
fn test_fallback_tool_executable_path_uses_vtmp_for_missing_single_file_tool() {

0 commit comments

Comments
 (0)