This is an archive of the discontinued LLVM Phabricator instance.

Remove Cmake compiler arguments.
ClosedPublic

Authored by stevanradakovic on Mar 30 2021, 3:26 AM.

Details

Summary

This way cmake will pick /usr/local/bin/cc or c++, which we
point to the appropriate compiler.

Diff Detail

Event Timeline

stevanradakovic requested review of this revision.Mar 30 2021, 3:26 AM

With this change the corresponding configurations will depend on the worker's internal set-up to use the desired compiler. IMO that's totally fine, provided that:

  • linaro-aarch64-flang-latest-clang picks at least clang-11, and
  • linaro-aarch64-flang-latest-gcc picks at least gcc-10.

But it is hard for me to review/check this without knowing the configuration of your workers. I'll defer to @maxim-kuvyrkov .

Personally I think that using CMake variables makes the configuration easier to reason about. Perhaps that's just implementation detail?

maxim-kuvyrkov accepted this revision.Mar 30 2021, 5:57 AM

With this change the corresponding configurations will depend on the worker's internal set-up to use the desired compiler. IMO that's totally fine, provided that:

  • linaro-aarch64-flang-latest-clang picks at least clang-11, and
  • linaro-aarch64-flang-latest-gcc picks at least gcc-10.

But it is hard for me to review/check this without knowing the configuration of your workers. I'll defer to @maxim-kuvyrkov .

We set compiler for various bot configurations at https://git.linaro.org/ci/dockerfiles.git/tree/tcwg-base/tcwg-llvmbot/run.sh#n61 .

Personally I think that using CMake variables makes the configuration easier to reason about. Perhaps that's just implementation detail?

We have experimented with this, and using CMake variables ...
... made it hard to experiment with new compiler versions for periodic updates
... made it tricky to use ccache consistently, especially for 2-stage builds.
So we decided to use rely on default cmake behavior of picking up /usr/local/bin/cc and /usr/local/bin/c++ for the compilers, and point these wrappers to specific compiler we want to use.

This revision is now accepted and ready to land.Mar 30 2021, 5:57 AM

With this change the corresponding configurations will depend on the worker's internal set-up to use the desired compiler. IMO that's totally fine, provided that:

  • linaro-aarch64-flang-latest-clang picks at least clang-11, and
  • linaro-aarch64-flang-latest-gcc picks at least gcc-10.

But it is hard for me to review/check this without knowing the configuration of your workers. I'll defer to @maxim-kuvyrkov .

We set compiler for various bot configurations at https://git.linaro.org/ci/dockerfiles.git/tree/tcwg-base/tcwg-llvmbot/run.sh#n61 .

Personally I think that using CMake variables makes the configuration easier to reason about. Perhaps that's just implementation detail?

We have experimented with this, and using CMake variables ...
... made it hard to experiment with new compiler versions for periodic updates
... made it tricky to use ccache consistently, especially for 2-stage builds.
So we decided to use rely on default cmake behavior of picking up /usr/local/bin/cc and /usr/local/bin/c++ for the compilers, and point these wrappers to specific compiler we want to use.

Makes sense, thank you for taking the time to explain!

This revision was automatically updated to reflect the committed changes.