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

Retire clang_version #451

Merged
merged 3 commits into from
Jul 23, 2024
Merged

Conversation

yamt
Copy link
Contributor

@yamt yamt commented Jul 18, 2024

Note: this makes the "install" target install the compiler rt into the compiler's runtime directory. IMO, it's what "install" is supposed to do. If you want to avoid modifing the runtime directory for some reasons, you can still do "dist" without "install".

Note: this makes the "install" target install the compiler rt
into the compiler's runtime directory.  IMO, it's what "install" is
supposed to do.  If you want to avoid modifing the runtime directory
for some reasons, you can still do "dist" without "install".
@alexcrichton
Copy link
Collaborator

Personally I think that "install" should only ever modify things under CMAKE_INSTALL_PREFIX by default. Having an option to modify the host compiler's sysroot seems reasonable, but I don't think by default this should modify the host compiler's sysroot.

@yamt
Copy link
Contributor Author

yamt commented Jul 20, 2024

Personally I think that "install" should only ever modify things under CMAKE_INSTALL_PREFIX by default. Having an option to modify the host compiler's sysroot seems reasonable, but I don't think by default this should modify the host compiler's sysroot.

i tend to disagree. but i pushed a change to avoid modifying the host compiler's resource dir.

Comment on lines 249 to 256
cmake_path(IS_PREFIX CMAKE_INSTALL_PREFIX ${clang_resource_dir} NORMALIZE install_resource_dir)
if(install_resource_dir)
install(DIRECTORY ${wasi_resource_dir}/lib
USE_SOURCE_PERMISSIONS
DESTINATION ${clang_resource_dir})
else()
message(STATUS "The resource dir (${clang_resource_dir}) will not be updated by the install target because it's out of CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}")
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

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

This to me seems odd to me to have a conditional installation. Could an option be added to modify the host compiler's resource-dir and if that's turned off then the preexisting install location is used? (or something similar to it, probalby not the exact same structure with a clang version that isn't guaranteed to match something)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm a bit confused because i just tried to follow your suggestion and you are now saying it's odd. :-)

how about the last push?

Copy link
Collaborator

@alexcrichton alexcrichton Jul 23, 2024

Choose a reason for hiding this comment

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

The first version of this PR unconditionally modified the host compiler resource-dir which I felt was surprising since it was modifying things outside of CMAKE_INSTALL_PREFIX. The second version of this PR, which this comment was targetting, did nothing by default and happened to install things if CMAKE_INSTALL_PREFIX lined up. I found that surprising as well because it's not documented and just a status message can be easily lost in configure output.

Third version of this PR makes more sense to me. Something is always installed and it always shows up somewhere, and an opt-in is enabled to perform a non-standard installation to put something outside of the installation prefix.

@alexcrichton alexcrichton merged commit e4fef74 into WebAssembly:main Jul 23, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants