Leo Yan
cdab92a759
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:33:40 +02:00
..
2025-10-19 16:33:36 +02:00
2025-02-08 09:58:03 +01:00
2024-08-29 15:56:37 -03:00
2024-06-26 11:07:42 -07:00
2024-07-31 16:12:59 -03:00
2024-10-02 17:23:23 -04:00
2024-06-26 11:07:42 -07:00
2024-09-06 11:44:58 -03:00
2024-09-10 17:32:47 -03:00
2024-08-22 12:38:18 -03:00
2024-09-11 13:08:46 -03:00
2024-08-14 10:20:40 -03:00
2025-10-19 16:33:36 +02:00
2024-08-28 18:14:42 -03:00
2024-08-28 18:15:16 -03:00
2024-08-14 10:20:40 -03:00
2024-08-14 10:20:40 -03:00
2024-09-03 11:43:16 -03:00
2023-12-12 14:55:13 -03:00
2024-09-03 11:47:02 -03:00
2024-09-03 11:50:20 -03:00
2024-09-03 11:50:20 -03:00
2024-09-03 11:53:15 -03:00
2024-08-21 11:39:51 -03:00
2024-09-03 11:54:47 -03:00
2025-09-09 18:58:25 +02:00
2024-01-03 17:54:54 -03:00
2024-12-05 14:02:27 +01:00
2024-08-01 12:11:33 -03:00
2025-04-10 14:39:26 +02:00
2024-08-28 18:21:49 -03:00
2025-09-09 18:58:25 +02:00
2024-08-14 10:20:40 -03:00
2024-09-03 10:15:16 -03:00
2025-08-15 12:13:58 +02:00
2024-08-12 18:07:10 -03:00
2024-09-10 17:32:47 -03:00
2024-09-10 17:32:47 -03:00
2024-10-28 13:04:52 -03:00
2024-08-20 17:53:12 -03:00
2024-05-10 10:52:46 -03:00
2025-04-10 14:39:22 +02:00
2024-05-07 18:06:44 -03:00
2024-05-07 18:06:44 -03:00
2023-12-12 14:55:13 -03:00
2024-12-05 14:02:17 +01:00
2024-08-29 15:55:24 -03:00
2024-08-12 18:13:00 -03:00
2024-08-12 18:12:44 -03:00
2024-08-12 18:15:39 -03:00
2024-01-22 12:08:21 -08:00
2024-05-06 15:28:49 -03:00
2025-04-10 14:39:24 +02:00
2024-03-21 10:41:28 -03:00
2024-08-09 17:37:03 -03:00
2024-08-01 18:54:19 -03:00
2024-08-01 18:54:19 -03:00
2025-10-19 16:33:35 +02:00
2024-07-31 16:12:59 -03:00
2024-05-06 15:28:49 -03:00
2024-08-19 14:52:13 -03:00
2025-04-10 14:39:25 +02:00
2024-08-19 14:52:13 -03:00
2024-08-19 14:52:13 -03:00
2024-09-03 12:22:01 -03:00
2024-09-03 12:22:01 -03:00
2024-08-22 12:32:18 -03:00
2024-10-02 18:21:49 -03:00
2023-12-23 10:56:05 -03:00
2025-02-08 09:57:28 +01:00
2025-02-08 09:57:28 +01:00
2024-08-12 18:07:10 -03:00
2024-08-12 18:07:10 -03:00
2024-08-28 18:07:20 -03:00
2025-04-10 14:39:24 +02:00
2024-12-05 14:02:18 +01:00
2024-08-01 18:55:55 -03:00
2025-10-19 16:33:37 +02:00
2025-08-15 12:13:52 +02:00
2025-02-08 09:57:29 +01:00
2024-02-13 13:47:08 -08:00
2024-07-31 16:58:18 -03:00
2024-06-03 22:07:52 -07:00
2024-04-18 22:22:51 -03:00
2025-02-08 09:57:28 +01:00
2024-08-30 09:24:27 -03:00
2024-03-21 13:54:40 -03:00
2024-08-12 18:05:14 -03:00
2024-08-28 18:20:38 -03:00
2024-08-28 18:07:20 -03:00
2024-08-12 18:05:14 -03:00
2025-06-19 15:32:06 +02:00
2025-04-10 14:39:25 +02:00
2024-08-13 15:24:48 -03:00
2024-08-19 14:51:46 -03:00
2024-08-19 14:51:46 -03:00
2024-09-03 10:39:20 -03:00
2024-09-03 10:39:20 -03:00
2025-10-19 16:33:36 +02:00
2025-06-19 15:32:08 +02:00
2024-09-10 17:32:47 -03:00
2024-08-01 18:55:55 -03:00
2024-08-01 18:55:55 -03:00
2024-09-10 17:32:47 -03:00
2024-09-10 17:32:47 -03:00
2025-02-08 09:57:31 +01:00
2024-02-12 12:35:41 -08:00
2025-04-07 10:08:36 +02:00
2024-09-06 11:45:17 -03:00
2024-08-01 18:55:55 -03:00
2024-08-01 18:55:55 -03:00
2024-09-11 11:27:42 -03:00
2024-04-18 22:22:51 -03:00
2024-08-01 18:55:55 -03:00
2025-02-08 09:57:31 +01:00
2025-02-08 09:57:31 +01:00
2024-09-11 11:27:42 -03:00
2024-09-11 11:27:42 -03:00
2024-08-12 18:15:27 -03:00
2024-05-26 08:41:34 -03:00
2024-02-15 13:48:36 -08:00
2023-12-12 14:55:13 -03:00
2024-03-21 13:53:45 -03:00
2024-02-15 13:48:36 -08:00
2024-02-15 13:48:36 -08:00
2024-12-05 14:02:24 +01:00
2025-04-10 14:39:22 +02:00
2025-04-10 14:39:22 +02:00
2025-04-10 14:39:21 +02:00
2024-09-11 11:27:42 -03:00
2024-07-31 16:12:59 -03:00
2024-07-31 16:12:59 -03:00
2025-06-27 11:11:46 +01:00
2024-05-06 15:28:49 -03:00
2024-12-05 14:02:20 +01:00
2024-12-05 14:02:20 +01:00
2025-04-10 14:39:25 +02:00
2024-03-03 22:51:18 -08:00
2024-03-21 10:41:28 -03:00
2024-08-12 18:05:14 -03:00
2025-10-19 16:33:37 +02:00
2024-08-30 09:23:51 -03:00
2025-10-19 16:33:40 +02:00
2024-08-21 11:48:43 -03:00
2024-08-21 11:48:43 -03:00
2024-09-03 10:15:16 -03:00
2024-08-16 19:35:18 -03:00
2025-04-10 14:39:21 +02:00
2024-03-21 10:41:28 -03:00
2024-04-18 22:22:51 -03:00
2024-03-21 10:41:28 -03:00
2024-08-12 13:59:22 -03:00
2024-05-06 15:28:49 -03:00
2024-05-06 16:07:30 -03:00
2025-09-04 15:31:43 +02:00
2025-08-15 12:13:51 +02:00
2024-05-07 18:06:44 -03:00
2024-09-10 17:32:47 -03:00
2024-09-10 17:32:47 -03:00
2024-10-23 11:34:56 -03:00
2024-07-12 09:49:02 -07:00
2024-02-22 09:11:03 -08:00
2025-06-19 15:32:08 +02:00
2025-06-19 15:32:08 +02:00
2024-03-03 22:52:04 -08:00
2024-03-03 22:52:13 -08:00
2024-09-03 11:21:55 -03:00
2024-08-12 18:13:58 -03:00
2024-08-12 18:13:58 -03:00
2023-12-18 21:34:39 -03:00
2024-09-10 09:52:13 -03:00
2024-02-01 22:10:27 -08:00
2024-02-01 22:10:27 -08:00
2024-05-09 18:46:43 -03:00
2024-05-09 18:46:43 -03:00
2024-08-12 18:05:14 -03:00
2025-04-10 14:39:24 +02:00
2024-07-12 09:38:41 -07:00
2024-07-17 13:17:57 -07:00
2024-05-06 15:28:49 -03:00
2024-08-20 17:53:12 -03:00
2024-02-22 09:11:41 -08:00
2024-04-17 12:21:39 -03:00
2024-09-27 15:38:52 -03:00
2025-10-19 16:33:36 +02:00