Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gcc CI to use gcc-11 container #59202

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Member Author

@am11 am11 Sep 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition was missed out previously, and was failing the libs.native subset build with gcc (which we currently don't exercise in the CI and maybe we can; since it takes 30-60 seconds max)

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