muon-build / muon

An implementation of the meson build system in c99
https://muon.build
GNU General Public License v3.0
166 stars 14 forks source link

Muon generates invalid ninja definitions when target name contains invalid ninja characters #85

Closed dcbaker closed 1 week ago

dcbaker commented 1 week ago

I'm not exactly sure what combination of things is needed to trigger this bug, but when I generate a project for Meson++, muon creates a compiler rule:

rule meson___cpp_compiler_for_meson++
  command = ccache g++ -std=c++17 -g -Og -Wpedantic -Wextra -Wall -fdiagnostics-color=always -Werror=switch-enum -Werror=implicit-fallthrough -Werror=return-type -Werror=unused-result -D_GNU_SOURCE -I src -I ../src -I src/frontend -I ../src/frontend -I src/mir -I ../src/mir -I src/mir/meson -I ../src/mir/meson -I src/util -I ../src/util -I src/backends -I ../src/backends -Wno-switch-enum -D_GNU_SOURCE -MD -MQ $out -MF ${out}.d -o $out -c $in
  deps = gcc
  depfile = ${out}.d
  description = compiling cpp $out

Which it then chokes on because + is not allowed in Ninja rule names.

With Muon 0.2.0

annacrombie commented 1 week ago

This was fixed in f801a14 which is in 0.3.0