recommended c++ compilation flags for Jetson Xavier

Hi,

Can Nvidia please advise regarding the recommended C++ compilation flags for run time performances for the Jetson Xavier

Thanks,
Gabi

As far as I know there is no recommendation from Nvidia.
Have consulted with internal developer if any will update to you.

I use g++ -c -MMD -pipe -std=gnu++17 -g -Wall -Werror -O3 and it works well.

You very seldom need to do anything more than this, and when you do, the specific options you need to enable depend on your specific workload – there’s no single setting that will “always be best” if you’re counting individual cycles.

I saw that openCV uses the following compilation flags:

fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG