We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug cmake custom command strings with newlines aren't escaped correctly when generating ninja build scripts.
while attempting to build llvm from source with meson:
cmake = import('cmake') if get_option('buildtype') == 'debug' llvm_build_type = 'Debug' elif get_option('buildtype') == 'release' llvm_build_type = 'Release' elif get_option('buildtype') == 'debugoptimized' llvm_build_type = 'RelWithDebInfo' elif get_option('buildtype') == 'minsize' llvm_build_type = 'MinSizeRel' else error('unsupported build type') endif llvm_parallel_jobs = 8 llvm_opts = cmake.subproject_options() llvm_opts.add_cmake_defines({ 'LLVM_PARALLEL_COMPILE_JOBS': llvm_parallel_jobs, 'LLVM_PARALLEL_LINK_JOBS': llvm_parallel_jobs, 'LLVM_TARGETS_TO_BUILD': 'host', 'LLVM_ENABLE_PROJECTS': 'llvm;clang;compiler-rt', 'CMAKE_BUILD_TYPE': llvm_build_type, }) llvm_subprj = cmake.subproject('llvm', options: llvm_opts)
it appears that meson is tripping up on the following in AddLLVM.cmake:
AddLLVM.cmake
add_custom_command(OUTPUT ${native_export_file} COMMAND "${Python3_EXECUTABLE}" -c "import sys;print(''.join(['EXPORTS\\n']+sys.stdin.readlines(),))" < ${export_file} > ${native_export_file} DEPENDS ${export_file} VERBATIM COMMENT "Creating export file for ${target_name}")
it ends up putting a literal newline into the build.ninja instead of an escaped newline:
build.ninja
############################################# # Custom command for llvm\tools\lto\LTO.def build llvm\tools\lto\LTO.def | ${cmake_ninja_workdir}llvm\tools\lto\LTO.def: CUSTOM_COMMAND D$:\Repos\lak-clean\subprojects\llvm\llvm\tools\lto\lto.exports COMMAND = cmd.exe /C "cd /D D:\Repos\lak-clean\build\subprojects\llvm\__CMake_build\llvm\tools\lto && C:\Users\lakri\AppData\Local\Programs\Python\Python310\python.exe -c "import sys" "print(''.join(['EXPORTS ']+sys.stdin.readlines(),))" < D:/Repos/lak-clean/subprojects/llvm/llvm/tools/lto/lto.exports > LTO.def" DESC = Creating export file for LTO restat = 1
which results in an error:
| CMake Error: | Running | 'C:/PROGRA~1/Meson/ninja.EXE' '-C' 'D:/Repos/lak-clean/build/subprojects/llvm/__CMake_build' '-t' 'recompact' | failed with: | ninja: error: build.ninja:41934: lexing error
Expected behavior meson should escape newlines when generating ninja build script
system parameters
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
cmake custom command strings with newlines aren't escaped correctly when generating ninja build scripts.
while attempting to build llvm from source with meson:
it appears that meson is tripping up on the following in
AddLLVM.cmake
:it ends up putting a literal newline into the
build.ninja
instead of an escaped newline:which results in an error:
Expected behavior
meson should escape newlines when generating ninja build script
system parameters
The text was updated successfully, but these errors were encountered: