summaryrefslogtreecommitdiffstats
path: root/debuginfo-tests/dexter/dex/builder/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'debuginfo-tests/dexter/dex/builder/scripts')
-rwxr-xr-xdebuginfo-tests/dexter/dex/builder/scripts/posix/clang-c.sh16
-rwxr-xr-xdebuginfo-tests/dexter/dex/builder/scripts/posix/clang.sh16
-rw-r--r--debuginfo-tests/dexter/dex/builder/scripts/windows/clang-cl_vs2015.bat23
-rw-r--r--debuginfo-tests/dexter/dex/builder/scripts/windows/clang.bat17
4 files changed, 72 insertions, 0 deletions
diff --git a/debuginfo-tests/dexter/dex/builder/scripts/posix/clang-c.sh b/debuginfo-tests/dexter/dex/builder/scripts/posix/clang-c.sh
new file mode 100755
index 00000000000..f69f51cd86a
--- /dev/null
+++ b/debuginfo-tests/dexter/dex/builder/scripts/posix/clang-c.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+set -e
+
+if test -z "$PATHTOCLANG"; then
+ PATHTOCLANG=clang
+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")
+ $PATHTOCLANG -std=gnu11 -c $CFLAGS $SRCFILE -o $OBJFILE
+done
+
+$PATHTOCLANG $LINKER_OPTIONS $OBJECT_FILES -o $EXECUTABLE_FILE
diff --git a/debuginfo-tests/dexter/dex/builder/scripts/posix/clang.sh b/debuginfo-tests/dexter/dex/builder/scripts/posix/clang.sh
new file mode 100755
index 00000000000..9cf4cdd65f7
--- /dev/null
+++ b/debuginfo-tests/dexter/dex/builder/scripts/posix/clang.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+set -e
+
+if test -z "$PATHTOCLANGPP"; then
+ PATHTOCLANGPP=clang++
+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")
+ $PATHTOCLANGPP -std=gnu++11 -c $CFLAGS $SRCFILE -o $OBJFILE
+done
+
+$PATHTOCLANGPP $LINKER_OPTIONS $OBJECT_FILES -o $EXECUTABLE_FILE
diff --git a/debuginfo-tests/dexter/dex/builder/scripts/windows/clang-cl_vs2015.bat b/debuginfo-tests/dexter/dex/builder/scripts/windows/clang-cl_vs2015.bat
new file mode 100644
index 00000000000..ea0d4414d26
--- /dev/null
+++ b/debuginfo-tests/dexter/dex/builder/scripts/windows/clang-cl_vs2015.bat
@@ -0,0 +1,23 @@
+@echo OFF
+setlocal EnableDelayedExpansion
+
+call "%VS140COMNTOOLS%..\..\VC\bin\amd64\vcvars64.bat"
+
+@echo OFF
+setlocal EnableDelayedExpansion
+
+for %%I in (%SOURCE_INDEXES%) do (
+ %PATHTOCLANGCL% /c !COMPILER_OPTIONS_%%I! !SOURCE_FILE_%%I! /Fo!OBJECT_FILE_%%I!
+ if errorlevel 1 goto :FAIL
+)
+
+%PATHTOCLANGCL% %LINKER_OPTIONS% %OBJECT_FILES% /Fe%EXECUTABLE_FILE%
+if errorlevel 1 goto :FAIL
+goto :END
+
+:FAIL
+echo FAILED
+exit /B 1
+
+:END
+exit /B 0
diff --git a/debuginfo-tests/dexter/dex/builder/scripts/windows/clang.bat b/debuginfo-tests/dexter/dex/builder/scripts/windows/clang.bat
new file mode 100644
index 00000000000..a83e4d4c1bb
--- /dev/null
+++ b/debuginfo-tests/dexter/dex/builder/scripts/windows/clang.bat
@@ -0,0 +1,17 @@
+setlocal EnableDelayedExpansion
+
+for %%I in (%SOURCE_INDEXES%) do (
+ %PATHTOCLANGPP% -fuse-ld=lld -c !COMPILER_OPTIONS_%%I! !SOURCE_FILE_%%I! -o !OBJECT_FILE_%%I!
+ if errorlevel 1 goto :FAIL
+)
+
+%PATHTOCLANGPP% -fuse-ld=lld %LINKER_OPTIONS% %OBJECT_FILES% -o %EXECUTABLE_FILE%
+if errorlevel 1 goto :FAIL
+goto :END
+
+:FAIL
+echo FAILED
+exit /B 1
+
+:END
+exit /B 0
OpenPOWER on IntegriCloud