Skip to content

Commit

Permalink
Fix suffix and target finding
Browse files Browse the repository at this point in the history
  • Loading branch information
chen3feng committed Mar 31, 2024
1 parent 2f7654d commit 328161e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"python.linting.pylintEnabled": true,
"python.analysis.extraPaths": [
"src",
"src/test"
Expand Down
2 changes: 2 additions & 0 deletions src/blade/cc_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,8 @@ def _cc_binary(self, objs, inclusion_check_result, dynamic_link):
objs.append(scm)
order_only_deps.append(scm)
output = self._target_file_path(self.name)
if os.name == 'nt':
output += '.exe'
self._cc_link(output, 'link', objs=objs, deps=usr_libs, sys_libs=sys_libs,
linker_scripts=self.attr.get('lds_fullpath'),
version_scripts=self.attr.get('vers_fullpath'),
Expand Down
1 change: 0 additions & 1 deletion src/blade/load_build_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ def load_targets(target_ids, excluded_targets, blade):
# starting dirs mentioned in command line
direct_targets, starting_dirs = _expand_target_patterns(blade, target_ids, excluded_trees)
starting_dirs -= excluded_dirs

# to prevent duplicated loading of BUILD files
processed_dirs = {}

Expand Down
3 changes: 0 additions & 3 deletions src/blade/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ def _add_location_reference_target(self, m):
def _unify_dep(self, dep):
"""Unify dep to key."""
(path, name, msgs) = _parse_target(dep)
console.warning(f'uni: dep={dep}, path={path}')

if msgs:
for msg in msgs:
Expand All @@ -464,7 +463,6 @@ def _unify_dep(self, dep):
else:
# Depend on library in current directory
path = self.path
console.warning(f'_unify_dep: dep={dep}, path={path}')
return '%s:%s' % (path, name)

def _init_target_deps(self, deps):
Expand All @@ -481,7 +479,6 @@ def _init_target_deps(self, deps):
"""
for d in deps:
dkey = self._unify_dep(d)
console.warning(f'deps={deps}, dkey={dkey}')
if dkey and dkey not in self.deps:
self.deps.append(dkey)

Expand Down

0 comments on commit 328161e

Please sign in to comment.