@@ -121,11 +121,6 @@ def parse_args():
121121 help = "Enable HIP backend. Architecture required to be specified." ,
122122 )
123123
124- p .add_argument (
125- "--build-dir" ,
126- default = "build" ,
127- help = "CMake build directory (default: build)" ,
128- )
129124 p .add_argument (
130125 "--clean" ,
131126 action = "store_false" ,
@@ -141,22 +136,22 @@ def parse_args():
141136
142137
143138def main ():
139+ name = "build_locally"
144140 if sys .platform not in ["cygwin" , "win32" , "linux" ]:
145- err (f"{ sys .platform } not supported" )
141+ err (f"{ sys .platform } not supported" , name )
146142 args = parse_args ()
147143 setup_dir = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
148- build_dir = os .path .join (setup_dir , args .build_dir )
149144
150145 c_compiler , cxx_compiler , compiler_root = resolve_compilers (
151146 args .oneapi , args .c_compiler , args .cxx_compiler , args .compiler_root
152147 )
153148
154149 # clean build dir if --clean set
155150 if args .clean :
156- clean_build_dir (build_dir )
151+ clean_build_dir (setup_dir )
157152
158153 if args .no_level_zero and args .target_level_zero :
159- err ("Cannot combine --no-level-zero and --target-level-zero" )
154+ err ("Cannot combine --no-level-zero and --target-level-zero" , name )
160155
161156 # Level Zero state (on unless explicitly disabled)
162157 if args .no_level_zero :
@@ -179,7 +174,7 @@ def main():
179174
180175 # handle architecture conflicts
181176 if args .target_hip is not None and not args .target_hip .strip ():
182- err ("--target-hip requires an explicit architecture" )
177+ err ("--target-hip requires an explicit architecture" , name )
183178
184179 # CUDA/HIP targets
185180 if args .target_cuda :
@@ -196,7 +191,7 @@ def main():
196191
197192 # ignore pre-existing CMAKE_ARGS for determinism in build driver
198193 if "CMAKE_ARGS" in env and env ["CMAKE_ARGS" ].strip ():
199- warn ("Ignoring pre-existing CMAKE_ARGS in environment" )
194+ warn ("Ignoring pre-existing CMAKE_ARGS in environment" , name )
200195 del env ["CMAKE_ARGS" ]
201196
202197 env ["CMAKE_ARGS" ] = cmake_args
0 commit comments