mirror of
https://github.com/partic2/libffi
synced 2026-11-11 02:27:19 +00:00
Enable forcing the usage of the static CRT in libffi's msvc wrapper
This is required for AddressSanitizer builds with clang-cl.
This commit is contained in:
@@ -44,7 +44,8 @@
|
|||||||
|
|
||||||
args_orig=$@
|
args_orig=$@
|
||||||
args="-nologo -W3"
|
args="-nologo -W3"
|
||||||
md=-MD
|
static_crt=
|
||||||
|
debug_crt=
|
||||||
cl="cl"
|
cl="cl"
|
||||||
ml="ml"
|
ml="ml"
|
||||||
safeseh="-safeseh"
|
safeseh="-safeseh"
|
||||||
@@ -114,9 +115,14 @@ do
|
|||||||
defines="$defines $1"
|
defines="$defines $1"
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
-DUSE_STATIC_RTL)
|
||||||
|
# Link against static CRT.
|
||||||
|
static_crt=1
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
-DUSE_DEBUG_RTL)
|
-DUSE_DEBUG_RTL)
|
||||||
# Link against debug CRT.
|
# Link against debug CRT.
|
||||||
md=-MDd
|
debug_crt=1
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
-c)
|
-c)
|
||||||
@@ -211,6 +217,16 @@ if [ -n "$opt" ]; then
|
|||||||
args="$args -link -OPT:REF -OPT:ICF -INCREMENTAL:NO"
|
args="$args -link -OPT:REF -OPT:ICF -INCREMENTAL:NO"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$static_crt" ]; then
|
||||||
|
md=-MT
|
||||||
|
else
|
||||||
|
md=-MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$debug_crt" ]; then
|
||||||
|
md="${md}d"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$assembly" ]; then
|
if [ -n "$assembly" ]; then
|
||||||
if [ -z "$outdir" ]; then
|
if [ -z "$outdir" ]; then
|
||||||
outdir="."
|
outdir="."
|
||||||
|
|||||||
Reference in New Issue
Block a user