mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.51k stars 1.6k forks source link

@OUTPUT@ is not being replaced in custom_target #13594

Open SirNate0 opened 3 weeks ago

SirNate0 commented 3 weeks ago

Describe the bug @OUTPUT@ is not being replaced in custom_target. When I build, I see gcc -S -O3 -std=c++20 -fverbose-asm ../sinetest.cpp && llvm-mca-14 @OUTPUT@ -timeline printed to the console and not gcc -S -O3 -std=c++20 -fverbose-asm ../sinetest.cpp && llvm-mca-14 sinetest.s -timeline

To Reproduce

project('foobar', 'cpp', default_options : ['cpp_std=c++20'])

custom_target('sinetest',output:'sinetest.s',input:'sinetest.cpp',command:['bash','-c','echo gcc -S -O3 -std=c++20 -fverbose-asm @INPUT@ "&&" llvm-mca-14 @OUTPUT@ -timeline'],build_by_default:true)

Expected behavior @OUTPUT@ is replaced with the output file sinetest.s.

system parameters

dcbaker commented 3 weeks ago

My suspicion is that we don't expect @OUTPUT@ and @INPUT@ to appear in a single string.