Skip to content

Conversation

jclarkeSTFC
Copy link
Contributor

@jclarkeSTFC jclarkeSTFC commented Nov 1, 2024

The version of clang that conda-forge uses is now 18, see here.

llvm-openmp was also updated to version 18 for consistency.

Fixes #38335.

As well as matching the version of clang on conda-forge, libc++ no longer supports clang version 16, see here.

To fix a problem casting an IValidator to an ArrayBoundedValidator<double> we had to disable an optimisation introduced in clang 17 with the -fno-assume-unique-vtables flag. See the release notes here.

We also disabled compiler extensions to help maintain code compatibility between different compilers.

To test:

  • Remove build/CMakeCache.txt
  • Create a new conda environment
  • Install a local build of the mantid-developer metapackage from this branch
  • Hit compile and go for a cup of tea

Double check that the CI used the correct clang version.

For the macOS system tests:

https://builds.mantidproject.org/job/build_packages_from_branch/948/


Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

@jclarkeSTFC jclarkeSTFC added macOS Only The issues related to macOS only. Currently could be x64 or ARM. ISIS: Core Issue and pull requests at ISIS that relate to Core features and functions labels Nov 1, 2024
@jclarkeSTFC jclarkeSTFC added this to the Release 6.12 milestone Nov 1, 2024
@jclarkeSTFC jclarkeSTFC force-pushed the 38335_clang_18 branch 2 times, most recently from 227b80d to 941ab38 Compare November 12, 2024 13:57
@jclarkeSTFC jclarkeSTFC removed the macOS Only The issues related to macOS only. Currently could be x64 or ARM. label Nov 12, 2024
@jclarkeSTFC jclarkeSTFC marked this pull request as ready for review November 13, 2024 08:37
@cailafinn cailafinn self-assigned this Nov 19, 2024
cailafinn
cailafinn previously approved these changes Nov 21, 2024
Copy link
Contributor

@cailafinn cailafinn left a comment

Choose a reason for hiding this comment

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

This all looks good to me. Builds fine on my machine and launches correctly. Builds on the CI all look good too.

@github-actions github-actions bot added the Has Conflicts Used by the bot to label pull requests that have conflicts label Nov 21, 2024
Copy link

👋 Hi, @jclarkeSTFC,

Conflicts have been detected against the base branch. Please rebase your branch against the base branch.

In Clang 17 a new optimisation was introduced that breaks
some of our tests, e.g. SplineSmoothingTest, so I've
disabled that option.
This should give us more consistent behaviour across
different compilers.
@jclarkeSTFC jclarkeSTFC removed the Has Conflicts Used by the bot to label pull requests that have conflicts label Nov 21, 2024
@jclarkeSTFC
Copy link
Contributor Author

I rebased due to a merge conflict in conda/recipes/conda_build_config.yaml

Copy link
Contributor

@cailafinn cailafinn left a comment

Choose a reason for hiding this comment

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

Re-approving post-merge conflicts

@sf1919 sf1919 added the macOS Only The issues related to macOS only. Currently could be x64 or ARM. label Nov 25, 2024
@SilkeSchomann SilkeSchomann self-assigned this Nov 25, 2024
@SilkeSchomann SilkeSchomann merged commit 72dbe87 into main Nov 25, 2024
10 checks passed
@SilkeSchomann SilkeSchomann deleted the 38335_clang_18 branch November 25, 2024 10:22
peterfpeterson pushed a commit to peterfpeterson/mantid that referenced this pull request Nov 26, 2024
This brings mantidproject#38342 into ornl-next

In Clang 17 a new optimisation was introduced that breaks
some of our tests, e.g. SplineSmoothingTest, so I've
disabled that option.

Use smart pointers instead of raw pointers

Disable compiler extensions

This should give us more consistent behaviour across
different compilers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISIS: Core Issue and pull requests at ISIS that relate to Core features and functions macOS Only The issues related to macOS only. Currently could be x64 or ARM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Clang to version 18
4 participants