[Lldb-commits] [PATCH] D140839: [lldb] Enable TestFrameFormatNameWithArgs in case of cross compilation
Ayush Sahay via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 30 09:35:27 PST 2023
asahay updated this revision to Diff 493337.
asahay added a comment.
Retain 'choices' for 'arch'.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140839/new/
https://reviews.llvm.org/D140839
Files:
lldb/test/Shell/Settings/TestFrameFormatNameWithArgs.test
lldb/test/Shell/helper/build.py
Index: lldb/test/Shell/helper/build.py
===================================================================
--- lldb/test/Shell/helper/build.py
+++ lldb/test/Shell/helper/build.py
@@ -110,6 +110,12 @@
nargs='+',
help='Source file(s) to compile / object file(s) to link')
+parser.add_argument('--std',
+ metavar='std',
+ dest='std',
+ required=False,
+ help='Specify the C/C++ standard.')
+
args = parser.parse_args(args=sys.argv[1:])
@@ -231,6 +237,7 @@
self.verbose = args.verbose
self.obj_ext = obj_ext
self.lib_paths = args.libs_dir
+ self.std = args.std
def _exe_file_name(self):
assert self.mode != 'compile'
@@ -581,6 +588,9 @@
args.append('--')
args.append(source)
+ if self.std:
+ args.append('/std:' + self.std)
+
return ('compiling', [source], obj,
self.compile_env,
args)
@@ -652,6 +662,9 @@
if sys.platform == 'darwin':
args.extend(['-isysroot', self.apple_sdk])
+ if self.std:
+ args.append('-std={0}'.format(self.std))
+
return ('compiling', [source], obj, None, args)
def _get_link_command(self):
@@ -789,6 +802,7 @@
print(' Verbose: ' + str(args.verbose))
print(' Dryrun: ' + str(args.dry))
print(' Inputs: ' + format_text(args.inputs, 0, 10))
+ print(' C/C++ Standard: ' + str(args.std))
print('Script Environment:')
print_environment(os.environ)
Index: lldb/test/Shell/Settings/TestFrameFormatNameWithArgs.test
===================================================================
--- lldb/test/Shell/Settings/TestFrameFormatNameWithArgs.test
+++ lldb/test/Shell/Settings/TestFrameFormatNameWithArgs.test
@@ -1,5 +1,5 @@
# UNSUPPORTED: system-windows
-# RUN: %clangxx_host -g -O0 %S/Inputs/names.cpp -std=c++17 -o %t.out
+# RUN: %build %S/Inputs/names.cpp --std c++17 -o %t.out
# RUN: %lldb -b -s %s %t.out | FileCheck %s
settings set -f frame-format "frame ${function.name-with-args}\n"
break set -n foo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140839.493337.patch
Type: text/x-patch
Size: 2176 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230130/e8c4b7ef/attachment.bin>
More information about the lldb-commits
mailing list