Skip to content

Commit a333ec8

Browse files
committed
Fixing issue with binary name.
There was an issue where the binary name was incorrectly set when building from any directory that isn't the project root. This fixes that issue by first getting the absolute path, then finding the binary name using that.
1 parent 05f2fe3 commit a333ec8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/build_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ def build_project(src_path, build_path, target, toolchain_name,
9797
# multiple compilations and linking with the same objects
9898
src_paths = [src_paths[0]] + list(set(src_paths[1:]))
9999
first_src_path = src_paths[0] if src_paths[0] != "." and src_paths[0] != "./" else getcwd()
100-
project_name = basename(normpath(first_src_path))
100+
abs_path = abspath(first_src_path)
101+
project_name = basename(normpath(abs_path))
101102

102103
if name is None:
103104
# We will use default project name based on project folder name

0 commit comments

Comments
 (0)