cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

[BUG] Regression output dpends on temporary directory

Open MaxSagebaum opened this issue 1 year ago • 2 comments

In the regression test run https://github.com/hsutter/cppfront/actions/runs/10382592222/job/28745930035?pr=1224. I got a diff for an linking of main in a random directory. We probably should remove the user of temporary intermediate targets.

diff --git a/regression-tests/test-results/gcc-10-c++20/mixed-type-safety-1.cpp.output b/regression-tests/test-results/gcc-10-c++20/mixed-type-safety-1.cpp.output
index 06f8418..bc55601 100644
--- a/regression-tests/test-results/gcc-10-c++20/mixed-type-safety-1.cpp.output
+++ b/regression-tests/test-results/gcc-10-c++20/mixed-type-safety-1.cpp.output
@@ -1,4 +1,4 @@
-/usr/bin/ld: /tmp/ccSlwpC6.o: in function `main':
+/usr/bin/ld: /tmp/ccJ7QUsS.o: in function `main':
 mixed-type-safety-1.cpp:(.text+0x327): undefined reference to `void print<std::integral_constant<bool, false> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::integral_constant<bool, false> const&)'
 /usr/bin/ld: mixed-type-safety-1.cpp:(.text+0x388): undefined reference to `void print<std::integral_constant<bool, true> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::integral_constant<bool, true> const&)'
 /usr/bin/ld: mixed-type-safety-1.cpp:(.text+0x422): undefined reference to `void print<std::integral_constant<bool, true> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::integral_constant<bool, true> const&)'

MaxSagebaum avatar Aug 14 '24 07:08 MaxSagebaum

I have tried to use the -pipe option, but gcc is still using the temporary file.

Nevertheless, this output identified an issue that should be addressed rather than be updated - more here: https://github.com/hsutter/cppfront/pull/1203#issuecomment-2295173063

filipsajdak avatar Aug 18 '24 08:08 filipsajdak

In my experience gcc uses the temporary directory when compiling from source to an executable. When using intermediate objects *.o files, now temporary files should be generated.

MaxSagebaum avatar Aug 19 '24 13:08 MaxSagebaum