[debuginfo-tests] b4b9fa5 - [debuginfo-tests][dexter] Add --builder gcc support for POSIX
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 08:42:50 PST 2020
Author: Pierre-vh
Date: 2020-03-03T16:42:24Z
New Revision: b4b9fa5e11abab38e4f5dcd65b57c0226a0aee15
URL: https://github.com/llvm/llvm-project/commit/b4b9fa5e11abab38e4f5dcd65b57c0226a0aee15
DIFF: https://github.com/llvm/llvm-project/commit/b4b9fa5e11abab38e4f5dcd65b57c0226a0aee15.diff
LOG: [debuginfo-tests][dexter] Add --builder gcc support for POSIX
Differential Revision: https://reviews.llvm.org/D75339
Added:
debuginfo-tests/dexter/dex/builder/scripts/posix/gcc.sh
Modified:
debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py
Removed:
################################################################################
diff --git a/debuginfo-tests/dexter/dex/builder/scripts/posix/gcc.sh b/debuginfo-tests/dexter/dex/builder/scripts/posix/gcc.sh
new file mode 100755
index 000000000000..c18e333127e0
--- /dev/null
+++ b/debuginfo-tests/dexter/dex/builder/scripts/posix/gcc.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+set -e
+
+if test -z "$PATHTOGCC"; then
+ PATHTOGCC=gcc
+fi
+
+for INDEX in $SOURCE_INDEXES
+do
+ CFLAGS=$(eval echo "\$COMPILER_OPTIONS_$INDEX")
+ SRCFILE=$(eval echo "\$SOURCE_FILE_$INDEX")
+ OBJFILE=$(eval echo "\$OBJECT_FILE_$INDEX")
+ $PATHTOGCC -std=gnu++11 -c $CFLAGS $SRCFILE -o $OBJFILE
+done
+
+$PATHTOGCC $LINKER_OPTIONS $OBJECT_FILES -o $EXECUTABLE_FILE
diff --git a/debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py b/debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py
index a2fc2969e965..a8bdd027d164 100644
--- a/debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py
+++ b/debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py
@@ -77,6 +77,13 @@ def _get_bisect_limits(self):
return limits
+ def handle_options(self, defaults):
+ options = self.context.options
+ if "clang" not in options.builder.lower():
+ raise Error("--builder %s is not supported by the clang-opt-bisect tool - only 'clang' is "
+ "supported " % options.builder)
+ super(Tool, self).handle_options(defaults)
+
def _run_test(self, test_name): # noqa
options = self.context.options
@@ -177,7 +184,7 @@ def _run_test(self, test_name): # noqa
file_name = ''.join(
c for c in file_name
if c.isalnum() or c in '()-_./ ').strip().replace(
- ' ', '_').replace('/', '_')
+ ' ', '_').replace('/', '_')
output_text_path = os.path.join(options.results_directory,
'{}.txt'.format(file_name))
@@ -188,7 +195,7 @@ def _run_test(self, test_name): # noqa
heuristic_verbose_output + '\n', stream=Stream(fp))
output_dextIR_path = os.path.join(options.results_directory,
- '{}.dextIR'.format(file_name))
+ '{}.dextIR'.format(file_name))
with open(output_dextIR_path, 'wb') as fp:
pickle.dump(steps, fp, protocol=pickle.HIGHEST_PROTOCOL)
@@ -229,7 +236,6 @@ def _handle_results(self) -> ReturnCode:
self._all_bisect_pass_summary)
return ReturnCode.OK
-
def _clang_opt_bisect_build(self, opt_bisect_limits):
options = self.context.options
compiler_options = [
More information about the llvm-commits
mailing list