Skip to content

Commit f448901

Browse files
committed
s
1 parent 2370b73 commit f448901

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

selfcheck.sh

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ if [ "$cxx_type" = "g++" ]; then
3636
inc="$inc -I$line"
3737
done <<< "$($CXX -x c++ -v -c -S - 2>&1 < /dev/null | grep -e'^ [/A-Z]' | grep -v /cc1plus)"
3838
elif [ "$cxx_type" = "clang" ]; then
39+
# libstdc++
3940
defs=
4041
defs="$defs -D__x86_64__"
4142
defs="$defs -D__STDC_HOSTED__"
@@ -46,12 +47,27 @@ elif [ "$cxx_type" = "clang" ]; then
4647
defs="$defs -D__has_include_next(x)=(0)"
4748
defs="$defs -D__has_attribute(x)=(0)"
4849

49-
# TODO: use libc++
5050
inc=
5151
while read line
5252
do
5353
inc="$inc -I$line"
5454
done <<< "$($CXX -x c++ -v -c -S - 2>&1 < /dev/null | grep -e'^ [/A-Z]')"
55+
56+
# TODO: enable?
57+
# libc++
58+
#defs=
59+
#defs="$defs -D__x86_64__"
60+
#defs="$defs -D__linux__"
61+
#defs="$defs -D__SIZEOF_SIZE_T__=8"
62+
#defs="$defs -D__has_include_next(x)=(0)"
63+
#defs="$defs -D__has_builtin(x)=(1)"
64+
#defs="$defs -D__has_feature(x)=(1)"
65+
66+
#inc=
67+
#while read line
68+
#do
69+
# inc="$inc -I$line"
70+
#done <<< "$($CXX -x c++ -stdlib=libc++ -v -c -S - 2>&1 < /dev/null | grep -e'^ [/A-Z]')"
5571
elif [ "$cxx_type" = "Apple" ]; then
5672
appleclang_ver=$($CXX -dumpversion)
5773
appleclang_ver=${appleclang_ver%%.*}
@@ -79,6 +95,12 @@ elif [ "$cxx_type" = "Apple" ]; then
7995
defs="$defs -D__is_target_variant_os(x)=(0)"
8096
defs="$defs -D__is_target_variant_environment(x)=(0)"
8197
inc=
98+
while read line
99+
do
100+
inc="$inc -I$line"
101+
done <<< "$($CXX -x c++ -v -c -S - 2>&1 < /dev/null | grep -e'^ [/A-Z]')"
102+
echo $inc
103+
inc=
82104
inc="$inc -I$sdk_path/usr/include/c++/v1"
83105
inc="$inc -I$sdk_path/usr/include"
84106
inc="$inc -I$sdk_path/usr/include/i386"

0 commit comments

Comments
 (0)