Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

support llvm-mingw for windows #171

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

Conversation

visualfc
Copy link
Member

@visualfc visualfc commented Nov 17, 2022

Support clang for windows

Changes

  • c2go -test cleanEndLine for windows \r\n=>\n
  • c2go use build.Import for support tags
  • c2go check clang --version for parse ClangTarget to set tags windows_msvc/windows_gnu
  • c2go proj use new pkg packages.NewImport for enable tags
  • cl compileDeclStmt ast.FunctionDecl global or __mingw_** in func
  • cl add blockCtx.needValist to need set "va_list" to ctypes.Valist if clang target windows-msvc
  • clang/ast add kind DLLImportAttr UnusedAttr NoDebugAttr
  • clang/types/parser fix panic: toType: illegal syntax: multiple types? - int (*)(void) __attribute__((cdecl)) #172 int (*)(void) attribute((cdecl)) for windows
  • testdata add libc.go libc_unix.go libc_gnu_windows.go libc_msvc_windows.go
  • testdata skip complex for _MSC_VER

@visualfc visualfc marked this pull request as draft November 17, 2022 14:12
@visualfc visualfc changed the title support clang-mingw for windows support llvm-mingw for windows Nov 17, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2022

Codecov Report

Base: 88.99% // Head: 89.23% // Increases project coverage by +0.23% 🎉

Coverage data is based on head (efc4123) compared to base (dddaf86).
Patch coverage: 91.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
+ Coverage   88.99%   89.23%   +0.23%     
==========================================
  Files          10       11       +1     
  Lines        3516     3585      +69     
==========================================
+ Hits         3129     3199      +70     
+ Misses        304      302       -2     
- Partials       83       84       +1     
Impacted Files Coverage Δ
cl/blockctx.go 86.44% <ø> (ø)
cl/codebuild.go 87.10% <ø> (ø)
packages/imp.go 89.83% <89.83%> (ø)
cl/compile.go 94.83% <100.00%> (+0.30%) ⬆️
cl/type_and_var.go 90.09% <100.00%> (+0.63%) ⬆️
clang/types/parser/parser.go 73.69% <100.00%> (+0.80%) ⬆️
cl/stmt.go 94.89% <0.00%> (+0.25%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@visualfc visualfc marked this pull request as ready for review November 19, 2022 14:35
@aadog
Copy link

aadog commented Nov 20, 2022

这样就支持windows了吗

@visualfc visualfc force-pushed the clang-mingw branch 10 times, most recently from f4059d7 to b5a0af9 Compare November 20, 2022 13:21
@visualfc
Copy link
Member Author

visualfc commented Nov 20, 2022

这样就支持windows了吗
已支持 windows 下 clang+msvc 和 llvm-mingw

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic: toType: illegal syntax: multiple types? - int (*)(void) __attribute__((cdecl))
3 participants