Skip to content

Commit

Permalink
Fix build using VS2019's clang or clang-cl for i686-pc-windows-msvc.
Browse files Browse the repository at this point in the history
Using clang-cl (MSVC command line syntax):
```
$ which clang-cl
/c/apps-x86/Microsoft Visual Studio/2019/BuildTools/VC/Tools/Llvm/bin/clang-cl
$ clang-cl --version
clang version 12.0.0
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\apps-x86\Microsoft Visual Studio\2019\BuildTools\VC\Tools\Llvm\bin
$ rm -Rf target/i686-pc-windows-msvc
$ CC=clang-cl cargo -vv test --target=i686-pc-windows-msvc
$ CC=clang-cl cargo -vv test --release --target=i686-pc-windows-msvc
```

Using clang (GCC command line syntax):
```
$ which clang
/c/apps-x86/Microsoft Visual Studio/2019/BuildTools/VC/Tools/Llvm/bin/clang
$ clang --version
clang version 12.0.0
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\apps-x86\Microsoft Visual Studio\2019\BuildTools\VC\Tools\Llvm\bin
$ rm -Rf target/i686-pc-windows-msvc
$ CC=clang cargo -vv test --target=i686-pc-windows-msvc
$ CC=clang cargo -vv test --release --target=i686-pc-windows-msvc
```
  • Loading branch information
briansmith committed Aug 13, 2021
1 parent fef3498 commit 9f13827
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crypto/fipsmodule/ec/p256.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#pragma warning(disable: 4267)
#endif

#if defined(__GNUC__)
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#endif
Expand Down
2 changes: 1 addition & 1 deletion crypto/poly1305/poly1305.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#if !defined(BORINGSSL_HAS_UINT128) || !defined(OPENSSL_X86_64)

#if defined(__GNUC__)
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wconversion"
#endif
Expand Down

0 comments on commit 9f13827

Please sign in to comment.