perf build python: Don't leave a.out file when building with clang
Testing clang features doesn't specify a "-o" option so an a.out file
is created and left in the make directory (not the output). Fix this
by specifying a "-o" of "/dev/null". Reorganize the code a little to
help with readability.
Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>