driver: Set -DPROFILING when compiling C++ sources with profiling
Earlier, we used to pass all preprocessor flags to the c++ compiler. This meant that -DPROFILING was passed to the c++ compiler because it was a part of C++ flags However, this was incorrect and the behaviour was changed in 8ff3134e. See #21291. But that commit exposed this bug where -DPROFILING was no longer being passed when compiling c++ sources. The fix is to explicitly include -DPROFILING in `opt_cxx` when profiling is enabled to ensure we pass the correct options for the way to both C and C++ compilers Fixes #24286
Showing
- compiler/GHC/Driver/Session.hs 2 additions, 1 deletioncompiler/GHC/Driver/Session.hs
- compiler/GHC/Platform/Ways.hs 4 additions, 0 deletionscompiler/GHC/Platform/Ways.hs
- testsuite/tests/driver/Makefile 0 additions, 2 deletionstestsuite/tests/driver/Makefile
- testsuite/tests/driver/T24286.cpp 7 additions, 0 deletionstestsuite/tests/driver/T24286.cpp
- testsuite/tests/driver/all.T 1 addition, 0 deletionstestsuite/tests/driver/all.T
Loading
Please register or sign in to comment