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

ci: fix windows-msvc builds, as well as the windows-cross job, turn on deprecation notices for [windows_stdcall] and [_fastcall]

This commit is contained in:
Delyan Angelov 2022-04-14 13:28:46 +03:00
parent 68401d9dc8
commit e555335bf0
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
4 changed files with 9 additions and 11 deletions

View File

@ -77,7 +77,7 @@ jobs:
- name: v_win.c can be compiled and run with -os windows
run: |
./v -os windows -o /tmp/v_win.c cmd/v
./v -cc msvc -os windows -o /tmp/v_win.c cmd/v
x86_64-w64-mingw32-gcc -I ./thirdparty/stdatomic/win /tmp/v_win.c -std=c99 -w -municode -o v_from_vc.exe
ls -lart v_from_vc.exe
wine64 ./v_from_vc.exe version
@ -102,8 +102,6 @@ jobs:
windows-cross:
runs-on: windows-2019
timeout-minutes: 25
env:
VFLAGS: -cc msvc
steps:
- uses: actions/checkout@v2
- name: Build
@ -113,8 +111,8 @@ jobs:
.\make.bat -msvc
- name: TODO v_win.c can be compiled and run with -os windows
run: |
.\v.exe -os windows -showcc -o v2.exe cmd\v
.\v.exe -os windows -o v_win.c cmd\v
.\v.exe -os windows -cc msvc -showcc -o v2.exe cmd\v
.\v.exe -os windows -cc msvc -o v_win.c cmd\v
dir v2.exe
dir v_win.c
.\v2.exe version

View File

@ -238,7 +238,7 @@ fn add_vectored_exception_handler(handler VectoredExceptionHandler) {
C.AddVectoredExceptionHandler(1, C.PVECTORED_EXCEPTION_HANDLER(handler))
}
[windows_stdcall]
[callconv: stdcall]
fn unhandled_exception_handler(e &ExceptionPointers) int {
match e.exception_record.code {
// These are 'used' by the backtrace printer

View File

@ -222,12 +222,12 @@ fn (mut p Parser) fn_decl() ast.FnDecl {
is_markused = true
}
'windows_stdcall' {
// TODO: uncomment after bootstrapping and replacing usages in builtin
// p.note_with_pos('windows_stdcall has been deprecated, it will be an error soon', p.tok.pos())
p.note_with_pos('the tag [windows_stdcall] has been deprecated, it will be an error after 2022-06-01, use `[callconv: stdcall]` instead',
p.tok.pos())
}
'_fastcall' {
// TODO: uncomment after bootstrapping and replacing usages in builtin
// p.note_with_pos('_fastcall has been deprecated, it will be an error soon', p.tok.pos())
p.note_with_pos('teh tag [_fastcall] has been deprecated, it will be an error after 2022-06-01, use `[callconv: fastcall]` instead',
p.tok.pos())
}
'callconv' {
if !fna.has_arg {

View File

@ -14,7 +14,7 @@ pub fn test_tatltuae() int {
}
[export: DllMain]
[windows_stdcall]
[callconv: stdcall]
fn main(hinst voidptr, fdw_reason int, lp_reserved voidptr) bool {
match fdw_reason {
C.DLL_PROCESS_ATTACH {