Skip to content

Commit

Permalink
SYCL RelWithDebInfo Build: Add -g1 (AMReX-Codes#3429)
Browse files Browse the repository at this point in the history
Add `-g1` to RelWithDebInfo build with oneAPI SYCL compiler (i.e.,
IntelLLVM). This is because with `-g` the link step can be very slow and
the final executable can be order of magnitude bigger than that
generated with `-g1`.

This actually passes `-g -g1` to the compiler. The first flag `-g` comes
from CMake with the RelWithDebInfo build type. Here, the order of the
two flags matter, because the latter flag `-g1` overrides `-g`.
  • Loading branch information
WeiqunZhang authored Jul 25, 2023
1 parent 14f698b commit ed1b3a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/CMake/AMReXFlagsTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ target_compile_options( Flags_CXX
$<${_cxx_appleclang_rwdbg}:>
$<${_cxx_appleclang_rel}:>
$<${_cxx_intelllvm_dbg}:-O0 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable>
$<${_cxx_intelllvm_rwdbg}:>
$<${_cxx_intelllvm_rwdbg}:-g1>
$<${_cxx_intelllvm_rel}:>
)

Expand Down

0 comments on commit ed1b3a1

Please sign in to comment.