Skip to content

Conversation

@wenju-he
Copy link
Contributor

This fixes No such file or directory error when "Unix Makefiles" generator is used, see intel/llvm#20058.

Ninja generator implicitly creates output directory when generating libclc libraries, but "Unix Makefiles" generator does not.

This fixes `No such file or directory` error when "Unix Makefiles"
generator is used, see intel/llvm#20058.

Ninja generator implicitly creates output directory when generating
libclc libraries, but "Unix Makefiles" generator does not.
@llvmbot llvmbot added the libclc libclc OpenCL library label Sep 12, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a build error in libclc when using the "Unix Makefiles" generator by ensuring the output directory exists before attempting to build libraries.

  • Adds explicit directory creation for LIBCLC_OUTPUT_LIBRARY_DIR using CMake's file(MAKE_DIRECTORY) command
  • Addresses inconsistency between Ninja and Unix Makefiles generators where Ninja implicitly creates directories but Unix Makefiles does not

@wenju-he wenju-he requested a review from arsenm September 12, 2025 00:22
@arsenm arsenm added the cmake Build system in general and CMake in particular label Sep 12, 2025
Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

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

Seems like a cmake bug

@wenju-he
Copy link
Contributor Author

Seems like a cmake bug

Thanks for the review.
AI search show this is expected behavior "Unix Makefiles" generator.

The Ninja generator takes a more explicit and proactive approach to ensuring output directories exist, aligning with its focus on robust and efficient parallel builds. The "Unix Makefiles" generator, in contrast, relies more on the implicit directory creation capabilities of the underlying make commands and the build environment.

@wenju-he wenju-he merged commit de8859d into llvm:main Sep 12, 2025
12 checks passed
@wenju-he wenju-he deleted the create-dir-LIBCLC_OUTPUT_LIBRARY_DIR branch September 12, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Build system in general and CMake in particular libclc libclc OpenCL library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants