Skip to content

Commit

Permalink
fix windows error
Browse files Browse the repository at this point in the history
  • Loading branch information
chen3feng committed Oct 11, 2023
1 parent 3ba10a9 commit c195cd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/blade/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def _get_cc_version(self):
version = ''
returncode, stdout, stderr = run_command(self.cc, shell=True)
if returncode == 0:
m = re.search('Compiler Version ([\d.]+)', stderr.strip())
m = re.search(r'Compiler Version ([\d.]+)', stderr.strip())
if m:
version = m.group(1)
if not version:
Expand Down
7 changes: 5 additions & 2 deletions src/blade/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ def setup_build_dir(self):
os.mkdir(build_dir)
try:
os.remove('blade-bin')
except os.error:
except:
pass
os.symlink(os.path.abspath(build_dir), 'blade-bin')
try:
os.symlink(os.path.abspath(build_dir), 'blade-bin')
except OSError as e:
console.warning("Can't create symbolic link 'blade-bin', %s" % e)

log_file = os.path.join(build_dir, 'blade.log')
console.set_log_file(log_file)
Expand Down

0 comments on commit c195cd0

Please sign in to comment.