Skip to content

Commit 64d19de

Browse files
committed
Fix Windows path parsing in generate_raw_ltoir.py
1 parent 3544ead commit 64d19de

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

testing/generate_raw_ltoir.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os
66
import pathlib
77
import platform
8+
import shlex
89
import subprocess
910
import sys
1011

@@ -77,7 +78,9 @@ def determine_include_flags():
7778
# Parse out the arguments following "INCLUDES=" - these are a space
7879
# separated list of strings that are potentially quoted.
7980

80-
quoted_flags = includes_lines[0].split("INCLUDES=")[1].strip().split()
81+
quoted_flags = shlex.split(
82+
includes_lines[0].split("INCLUDES=")[1].strip(), posix=False
83+
)
8184
include_flags = [flag.strip('"') for flag in quoted_flags]
8285
cccl_include_flags = [flag + os.path.sep + "cccl" for flag in include_flags]
8386
include_flags += cccl_include_flags

0 commit comments

Comments
 (0)