Skip to content

[lldb][test] Use $(STRIP) instead of strip in API tests (Darwin-only change) #111816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions lldb/packages/Python/lldbsuite/test/builders/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,31 +169,31 @@ def getToolchainUtil(util_name):
if not os.getenv("LLVM_AR"):
utils.extend(["LLVM_AR=%s" % getToolchainUtil("llvm-ar")])

if not lldbplatformutil.platformIsDarwin():
if cc_type in ["clang", "cc", "gcc"]:
util_paths = {}
# Assembly a toolchain side tool cmd based on passed CC.
for var, name in util_names.items():
# Do not override explicity specified tool from the cmd line.
if not os.getenv(var):
util_paths[var] = getToolchainUtil("llvm-" + name)
else:
util_paths[var] = os.getenv(var)
utils.extend(["AR=%s" % util_paths["ARCHIVER"]])

# Look for llvm-dwp or gnu dwp
if not lldbutil.which(util_paths["DWP"]):
util_paths["DWP"] = getToolchainUtil("llvm-dwp")
if not lldbutil.which(util_paths["DWP"]):
util_paths["DWP"] = lldbutil.which("llvm-dwp")
if cc_type in ["clang", "cc", "gcc"]:
util_paths = {}
# Assembly a toolchain side tool cmd based on passed CC.
for var, name in util_names.items():
# Do not override explicity specified tool from the cmd line.
if not os.getenv(var):
util_paths[var] = getToolchainUtil("llvm-" + name)
else:
util_paths[var] = os.getenv(var)
utils.extend(["AR=%s" % util_paths["ARCHIVER"]])

# Look for llvm-dwp or gnu dwp
if not lldbutil.which(util_paths["DWP"]):
util_paths["DWP"] = getToolchainUtil("llvm-dwp")
if not lldbutil.which(util_paths["DWP"]):
util_paths["DWP"] = lldbutil.which("llvm-dwp")
if not util_paths["DWP"]:
util_paths["DWP"] = lldbutil.which("dwp")
if not util_paths["DWP"]:
util_paths["DWP"] = lldbutil.which("dwp")
if not util_paths["DWP"]:
del util_paths["DWP"]
del util_paths["DWP"]

for var, path in util_paths.items():
utils.append("%s=%s" % (var, path))
else:
for var, path in util_paths.items():
utils.append("%s=%s" % (var, path))

if lldbplatformutil.platformIsDarwin():
utils.extend(["AR=%slibtool" % os.getenv("CROSS_COMPILE", "")])

return [
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/API/lang/objc/hidden-ivars/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ endif

stripped: a.out libInternalDefiner.dylib
mkdir stripped
strip -Sx a.out -o stripped/a.out
strip -Sx libInternalDefiner.dylib -o stripped/libInternalDefiner.dylib
$(STRIP) -Sx a.out -o stripped/a.out
$(STRIP) -Sx libInternalDefiner.dylib -o stripped/libInternalDefiner.dylib
ifneq "$(CODESIGN)" ""
$(CODESIGN) -fs - stripped/a.out
endif
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/lang/objc/objc-ivar-stripped/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ all: a.out.stripped
include Makefile.rules

a.out.stripped: a.out.dSYM
strip -o a.out.stripped a.out
$(STRIP) -o a.out.stripped a.out
ifneq "$(CODESIGN)" ""
$(CODESIGN) -fs - a.out.stripped
endif
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LD_EXTRAS := -lobjc -framework Foundation
default: a.out.stripped

a.out.stripped: a.out.dSYM
strip -o a.out.stripped a.out
$(STRIP) -o a.out.stripped a.out
ln -sf a.out.dSYM a.out.stripped.dSYM

include Makefile.rules
2 changes: 1 addition & 1 deletion lldb/test/API/macosx/add-dsym/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hide.app/Contents/a.out.dSYM:
mkdir hide.app
mkdir hide.app/Contents
mv a.out.dSYM hide.app/Contents
strip -x a.out
$(STRIP) -x a.out
ifneq "$(CODESIGN)" ""
$(CODESIGN) -fs - a.out
endif
2 changes: 1 addition & 1 deletion lldb/test/API/tools/lldb-dap/module/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include Makefile.rules
all: a.out.stripped

a.out.stripped:
strip -o a.out.stripped a.out
$(STRIP) -o a.out.stripped a.out

ifneq "$(CODESIGN)" ""
$(CODESIGN) -fs - a.out.stripped
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/tools/lldb-dap/terminated-event/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include Makefile.rules
all: a.out.stripped

a.out.stripped:
strip -o a.out.stripped a.out
$(STRIP) -o a.out.stripped a.out

ifneq "$(CODESIGN)" ""
$(CODESIGN) -fs - a.out.stripped
Expand Down
Loading