Skip to content

Commit 9197ec7

Browse files
Add --debug option to command line argument
1 parent 8a3d5ce commit 9197ec7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/build_locally.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
def run(
77
use_oneapi=True,
8+
build_type="Relese",
89
c_compiler=None,
910
cxx_compiler=None,
1011
level_zero=True,
@@ -34,7 +35,7 @@ def run(
3435
"--",
3536
"-G",
3637
build_system,
37-
"-DCMAKE_BUILD_TYPE=Debug",
38+
"-DCMAKE_BUILD_TYPE=" + build_type,
3839
"-DCMAKE_C_COMPILER:PATH=" + c_compiler,
3940
"-DCMAKE_CXX_COMPILER:PATH=" + cxx_compiler,
4041
"-DDPCTL_ENABLE_LO_PROGRAM_CREATION=" + ("ON" if level_zero else "OFF"),
@@ -66,6 +67,13 @@ def run(
6667
dest="oneapi",
6768
action="store_true",
6869
)
70+
driver.add_argument(
71+
"--debug",
72+
default="Release",
73+
const="Debug",
74+
action="store_const",
75+
help="Set the compilation mode to debugging",
76+
)
6977
driver.add_argument(
7078
"--compiler-root", type=str, help="Path to compiler home directory"
7179
)
@@ -103,6 +111,7 @@ def run(
103111

104112
run(
105113
use_oneapi=args.oneapi,
114+
build_type=args.debug,
106115
c_compiler=args.c_compiler,
107116
cxx_compiler=args.cxx_compiler,
108117
level_zero=args.level_zero,

0 commit comments

Comments
 (0)