Skip to content

Commit 1fac1db

Browse files
committed
refactor: simplify library target naming and suffix handling in SConstruct
1 parent 29c8824 commit 1fac1db

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

SConstruct

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,13 @@ if env["platform"] == "macos":
148148
)
149149
else:
150150
ios_sim_suffix = ".simulator" if env["platform"] == "ios" and env.get("ios_simulator", False) else ""
151-
target = "{}{}{}".format(
151+
target = "{}{}{}{}".format(
152152
target,
153153
env["arch"],
154-
ios_sim_suffix
154+
ios_sim_suffix,
155+
env["SHLIBSUFFIX"]
155156
)
156-
# On Windows, SCons rejects target names whose suffix doesn't match SHLIBSUFFIX (.dll).
157-
# Appending the suffix explicitly and clearing SHLIBSUFFIX prevents the double-suffix error.
158-
if env["platform"] == "windows":
159-
target = target + env["SHLIBSUFFIX"]
160-
env["SHLIBSUFFIX"] = ""
161-
target_out = target + env["SHLIBSUFFIX"]
157+
target_out = target
162158

163159
library = env.SharedLibrary(target=target, source=sources)
164160

0 commit comments

Comments
 (0)