diff --git a/Make/NinjaBuild.pl b/Make/NinjaBuild.pl index 39755dee3..ca9deda9f 100755 --- a/Make/NinjaBuild.pl +++ b/Make/NinjaBuild.pl @@ -366,6 +366,11 @@ sub read_conf { # set linker unshift @{$options{'LINK'}}, "$nvcc --forward-unknown-to-host-compiler -ccbin"; + + my @arch = grep(/-arch/,@{$options{'GPUFLAGS'}}); # Check if architecture is specified by user + if (!@arch) { + push(@{$options{'GPUFLAGS'}},"-arch=all"); # If not specified by user compile fat binary + } } else { push(@{$options{'GPUFLAGS'}},"-xhip -fgpu-rdc"); push(@{$options{'LDFLAGS'}},"-lstdc++ --hip-link");