Skip to content

Commit

Permalink
Update gcc CI to use gcc-11 container (#59202)
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 authored Sep 16, 2021
1 parent cef245d commit b9926a5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
8 changes: 5 additions & 3 deletions eng/native/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,11 @@ if (CLR_CMAKE_HOST_UNIX)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-stringop-truncation>)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-placement-new>)

check_cxx_compiler_flag(-faligned-new COMPILER_SUPPORTS_F_ALIGNED_NEW)
if (COMPILER_SUPPORTS_F_ALIGNED_NEW)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-faligned-new>)
if (CMAKE_CXX_COMPILER_ID)
check_cxx_compiler_flag(-faligned-new COMPILER_SUPPORTS_F_ALIGNED_NEW)
if (COMPILER_SUPPORTS_F_ALIGNED_NEW)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-faligned-new>)
endif()
endif()
endif()

Expand Down
6 changes: 5 additions & 1 deletion eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ parameters:
# When set to true, passes the 'platforms' value as a job parameter also named 'platforms'.
# Handled as an opt-in parameter to avoid excessive yaml.
passPlatforms: false
container: ''
jobParameters: {}
variables: []

Expand Down Expand Up @@ -169,7 +170,10 @@ jobs:
targetRid: linux-x64
platform: Linux_x64
container:
image: centos-7-20210714125435-9b5bbc2
${{ if eq(parameters.container, '') }}:
image: centos-7-20210714125435-9b5bbc2
${{ if ne(parameters.container, '') }}:
image: ${{ parameters.container }}
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
buildConfig: checked
platforms:
- Linux_x64
container: debian-11-gcc11-amd64-20210916125744-f42d766
jobParameters:
testGroup: innerloop
compilerName: gcc
Expand Down
8 changes: 6 additions & 2 deletions src/coreclr/jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories("./jitstd")
include_directories("../inc")

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-error) # tracked by https://github.com/dotnet/runtime/issues/33541
# gcc 10 and lower versions are too sensitive to bit fields width and warn from core compiler.
# Since there is no better / specific suppression available for these core warnings, we disable
# warn-as-error (-Werror) for JIT in this case. This issue has been fixed in gcc 11.
# See https://github.com/dotnet/runtime/issues/33541
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0)
add_compile_options(-Wno-error)
endif()

function(create_standalone_jit)
Expand Down

0 comments on commit b9926a5

Please sign in to comment.