
Leo YanandGreg Kroah-Hartman
5e51bb7ffc
perf python: split Clang options when invoking Popen
[ Upstream commit c6a43bc3e8 ]
When passing a list to subprocess.Popen, each element maps to one argv
token. Current code bundles multiple Clang flags into a single element,
something like:
cmd = ['clang',
'--target=x86_64-linux-gnu -fintegrated-as -Wno-cast-function-type-mismatch',
'test-hello.c']
So Clang only sees one long, invalid option instead of separate flags,
as a result, the script cannot capture any log via PIPE.
Fix this by using shlex.split() to separate the string so each option
becomes its own argv element. The fixed list will be:
cmd = ['clang',
'--target=x86_64-linux-gnu',
'-fintegrated-as',
'-Wno-cast-function-type-mismatch',
'test-hello.c']
Fixes: 09e6f9f983 ("perf python: Fix splitting CC into compiler and options")
Signed-off-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20251006-perf_build_android_ndk-v3-2-4305590795b2@arm.com
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: linux-riscv@lists.infradead.org
Cc: llvm@lists.linux.dev
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-perf-users@vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-19 16:30:43 +02:00
..
2025-10-19 16:30:40 +02:00
2024-04-27 17:11:34 +02:00
2024-06-12 11:12:23 +02:00
2023-08-16 08:48:06 -03:00
2023-08-16 08:46:45 -03:00
2023-08-03 17:01:28 -03:00
2023-08-23 08:41:52 -03:00
2024-10-04 16:29:24 +02:00
2024-10-04 16:29:24 +02:00
2025-10-19 16:30:40 +02:00
2024-06-21 14:38:39 +02:00
2024-10-04 16:29:24 +02:00
2024-10-04 16:29:24 +02:00
2023-11-20 11:59:25 +01:00
2025-09-09 18:56:33 +02:00
2024-01-25 15:35:54 -08:00
2023-08-15 16:41:48 -03:00
2023-08-03 17:01:24 -03:00
2023-08-16 08:37:52 -03:00
2023-08-25 10:24:10 -03:00
2024-08-11 12:47:18 +02:00
2023-08-15 16:41:48 -03:00
2024-12-09 10:32:23 +01:00
2024-03-26 18:19:43 -04:00
2024-01-25 15:35:55 -08:00
2023-09-29 23:55:05 -07:00
2023-07-11 11:41:07 -03:00
2025-02-08 09:52:05 +01:00
2025-02-08 09:52:05 +01:00
2024-06-12 11:12:15 +02:00
2023-07-28 19:01:16 -03:00
2025-04-10 14:37:33 +02:00
2024-12-09 10:32:24 +01:00
2025-10-19 16:30:41 +02:00
2025-08-15 12:08:53 +02:00
2025-02-08 09:52:05 +01:00
2023-08-17 14:12:14 -03:00
2023-08-17 14:12:14 -03:00
2023-08-17 14:12:14 -03:00
2024-01-25 15:35:52 -08:00
2023-09-11 10:31:02 -03:00
2025-02-08 09:52:05 +01:00
2024-01-25 15:35:52 -08:00
2024-10-10 11:58:09 +02:00
2024-10-04 16:29:24 +02:00
2025-06-19 15:28:27 +02:00
2025-10-19 16:30:40 +02:00
2025-02-08 09:52:07 +01:00
2024-06-12 11:12:29 +02:00
2024-06-12 11:12:29 +02:00
2024-01-25 15:35:51 -08:00
2023-08-25 10:22:16 -03:00
2023-12-13 18:45:34 +01:00
2025-02-08 09:52:07 +01:00
2025-02-08 09:52:07 +01:00
2023-09-02 08:12:15 -03:00
2023-09-02 08:12:15 -03:00
2023-08-31 16:24:55 -03:00
2023-11-20 11:59:28 +01:00
2024-06-12 11:12:32 +02:00
2023-08-16 08:49:10 -03:00
2023-08-16 08:52:45 -03:00
2024-12-09 10:32:28 +01:00
2025-04-10 14:37:32 +02:00
2025-04-10 14:37:32 +02:00
2023-08-24 10:38:04 -03:00
2025-04-10 14:37:32 +02:00
2023-08-29 14:16:14 -03:00
2025-06-27 11:09:04 +01:00
2023-08-29 14:16:14 -03:00
2024-06-12 11:12:13 +02:00
2023-08-07 16:40:29 -03:00
2024-12-09 10:32:25 +01:00
2024-12-09 10:32:25 +01:00
2023-08-16 08:37:52 -03:00
2025-04-10 14:37:34 +02:00
2023-08-29 14:16:14 -03:00
2025-10-19 16:30:41 +02:00
2025-10-19 16:30:43 +02:00
2024-10-04 16:29:23 +02:00
2024-03-26 18:19:47 -04:00
2024-10-04 16:29:24 +02:00
2025-04-10 14:37:32 +02:00
2023-07-24 18:23:18 -03:00
2024-06-12 11:13:02 +02:00
2024-06-12 11:13:02 +02:00
2023-08-29 14:13:48 -03:00
2024-06-12 11:12:16 +02:00
2023-08-11 11:27:50 -03:00
2025-08-15 12:08:53 +02:00
2024-06-12 11:12:29 +02:00
2023-08-29 14:16:14 -03:00
2024-03-26 18:19:46 -04:00
2023-08-14 11:46:51 +02:00
2024-10-10 12:49:09 +02:00
2024-10-10 12:49:09 +02:00
2024-10-04 16:29:24 +02:00
2024-10-04 16:29:23 +02:00
2024-06-12 11:12:16 +02:00
2025-04-10 14:37:33 +02:00
2024-01-25 15:35:53 -08:00
2024-01-25 15:35:53 -08:00
2023-08-16 08:48:06 -03:00
2025-10-19 16:30:40 +02:00