1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: fix the g++ build and the alpine-musl task

This commit is contained in:
Delyan Angelov 2021-09-28 15:23:16 +03:00
parent 9bf6d57032
commit 3467ab1551
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 19 additions and 14 deletions

View File

@ -257,18 +257,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Build V
run: |
make CC=clang
- name: Show PWD and Environment
- name: Show Environment
run: |
echo "PWD:"
pwd
echo "ENVIRONMENT"
echo "ENVIRONMENT:"
env
echo "C Compiler:"
gcc --version
- name: Build V
run: CC=gcc make
- name: Test V fixed tests
run: |
./v -silent test-self
run: ./v -silent test-self
macos:
needs: no-scheduling

View File

@ -552,13 +552,16 @@ fn (mut v Builder) cc() {
v.setup_output_name()
if v.pref.os != .windows && ccompiler.contains('++') {
for file in v.parsed_files {
if file.imports.any(it.mod.contains('sync')) {
x := @VEXE + ' run ' +
os.join_path(@VEXEROOT, 'thirdparty', 'stdatomic', 'nix', 'cpp', 'gen.v') +
' ' + ccompiler
os.execute(x)
break
cpp_atomic_h_path := '${@VEXEROOT}/thirdparty/stdatomic/nix/cpp/atomic.h'
if !os.exists(cpp_atomic_h_path) {
for file in v.parsed_files {
if file.imports.any(it.mod.contains('sync')) {
$if trace_stdatomic_gen {
eprintln('> creating $cpp_atomic_h_path ...')
}
os.execute('$vexe run ${@VEXEROOT}/thirdparty/stdatomic/nix/cpp/gen.v $ccompiler')
break
}
}
}
}