Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: fusl/tools/musl-clang.in

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/tools/mkalltypes.sed ('k') | fusl/tools/musl-gcc.specs.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/tools/musl-clang.in
diff --git a/fusl/tools/musl-clang.in b/fusl/tools/musl-clang.in
new file mode 100644
index 0000000000000000000000000000000000000000..623de6f64f52e55f3ee9a98ddfa777530989a7a7
--- /dev/null
+++ b/fusl/tools/musl-clang.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+cc="@CC@"
+libc="@PREFIX@"
+libc_inc="@INCDIR@"
+libc_lib="@LIBDIR@"
+thisdir="`cd "$(dirname "$0")"; pwd`"
+
+# prevent clang from running the linker (and erroring) on no input.
+sflags=
+eflags=
+for x ; do
+ case "$x" in
+ -l*) input=1 ;;
+ *) input= ;;
+ esac
+ if test "$input" ; then
+ sflags="-l-user-start"
+ eflags="-l-user-end"
+ break
+ fi
+done
+
+exec $cc \
+ -B"$thisdir" \
+ -fuse-ld=musl-clang \
+ -static-libgcc \
+ -nostdinc \
+ --sysroot "$libc" \
+ -isystem "$libc_inc" \
+ -L-user-start \
+ $sflags \
+ "$@" \
+ $eflags \
+ -L"$libc_lib" \
+ -L-user-end
« no previous file with comments | « fusl/tools/mkalltypes.sed ('k') | fusl/tools/musl-gcc.specs.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698