Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 6a96fba

Browse files
author
Ian Hays
authored
Merge pull request #17502 from ianhays/1.1_clang6
[1.1] Enable clang6 build
2 parents fe2322e + 738e851 commit 6a96fba

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,17 @@ while :; do
577577
__ClangMajorVersion=4
578578
__ClangMinorVersion=0
579579
;;
580+
581+
clang5.0|-clang5.0)
582+
__ClangMajorVersion=5
583+
__ClangMinorVersion=0
584+
;;
585+
586+
clang6.0|-clang6.0)
587+
__ClangMajorVersion=6
588+
__ClangMinorVersion=0
589+
;;
590+
580591

581592
ninja)
582593
__UseNinja=1

compileoptions.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ if (CLR_CMAKE_PLATFORM_UNIX)
3636
# There are constants of type BOOL used in a condition. But BOOL is defined as int
3737
# and so the compiler thinks that there is a mistake.
3838
add_compile_options(-Wno-constant-logical-operand)
39+
# We use pshpack1/2/4/8.h and poppack.h headers to set and restore packing. However
40+
# clang 6.0 complains when the packing change lifetime is not contained within
41+
# a header file.
42+
add_compile_options(-Wno-pragma-pack)
3943

4044
add_compile_options(-Wno-unknown-warning-option)
4145

src/inc/utilcode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ inline HRESULT DecimalCanonicalize(DECIMAL* dec)
11161116
//
11171117
//*****************************************************************************
11181118
// secure version! Specify the size of the each buffer in count of elements
1119-
void SplitPath(register const WCHAR *path,
1119+
void SplitPath(const WCHAR *path,
11201120
__inout_z __inout_ecount_opt(driveSizeInWords) WCHAR *drive, int driveSizeInWords,
11211121
__inout_z __inout_ecount_opt(dirSizeInWords) WCHAR *dir, int dirSizeInWords,
11221122
__inout_z __inout_ecount_opt(fnameSizeInWords) WCHAR *fname, size_t fnameSizeInWords,

src/jit/ee_il_dll.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ void Compiler::eeDispVar(ICorDebugInfo::NativeVarInfo* var)
793793
printf("%3d(%10s) : From %08Xh to %08Xh, in ", var->varNumber,
794794
(VarNameToStr(name) == nullptr) ? "UNKNOWN" : VarNameToStr(name), var->startOffset, var->endOffset);
795795

796-
switch (var->loc.vlType)
796+
switch ((Compiler::siVarLocType)var->loc.vlType)
797797
{
798798
case VLT_REG:
799799
case VLT_REG_BYREF:

src/vm/gcenv.ee.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ void GCToEEInterface::SuspendEE(SUSPEND_REASON reason)
2727
{
2828
WRAPPER_NO_CONTRACT;
2929

30-
static_assert_no_msg(SUSPEND_FOR_GC == ThreadSuspend::SUSPEND_FOR_GC);
31-
static_assert_no_msg(SUSPEND_FOR_GC_PREP == ThreadSuspend::SUSPEND_FOR_GC_PREP);
32-
30+
static_assert_no_msg(SUSPEND_FOR_GC == (int)ThreadSuspend::SUSPEND_FOR_GC);
31+
static_assert_no_msg(SUSPEND_FOR_GC_PREP == (int)ThreadSuspend::SUSPEND_FOR_GC_PREP);
32+
3333
_ASSERTE(reason == SUSPEND_FOR_GC || reason == SUSPEND_FOR_GC_PREP);
3434

3535
ThreadSuspend::SuspendEE((ThreadSuspend::SUSPEND_REASON)reason);

0 commit comments

Comments
 (0)