Skip to content

Commit ad366fb

Browse files
committed
---
yaml --- r: 37803 b: refs/heads/try c: b17b3d9 h: refs/heads/master i: 37801: e0554eb 37799: 4645b44 v: v3
1 parent 857826e commit ad366fb

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: 54ae377ec26ed47bbb627bdcb58bb10658cf03c4
5+
refs/heads/try: b17b3d9c1275bca68b84443a0e4795d1648fcf60
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/configure

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,38 @@ probe_need() {
114114
fi
115115
}
116116

117+
validate_opt () {
118+
for arg in $CFG_CONFIGURE_ARGS
119+
do
120+
isArgValid=0
121+
for option in $BOOL_OPTIONS
122+
do
123+
if test --disable-$option = $arg
124+
then
125+
isArgValid=1
126+
fi
127+
if test --enable-$option = $arg
128+
then
129+
isArgValid=1
130+
fi
131+
done
132+
for option in $VAL_OPTIONS
133+
do
134+
if echo "$arg" | grep -q -- "--$option="
135+
then
136+
isArgValid=1
137+
fi
138+
done
139+
if test $isArgValid -eq 0
140+
then
141+
err "Option '$arg' is not recognized"
142+
fi
143+
done
144+
}
145+
117146
valopt() {
147+
VAL_OPTIONS="$VAL_OPTIONS $1"
148+
118149
local OP=$1
119150
local DEFAULT=$2
120151
shift
@@ -145,6 +176,8 @@ valopt() {
145176
}
146177

147178
opt() {
179+
BOOL_OPTIONS="$BOOL_OPTIONS $1"
180+
148181
local OP=$1
149182
local DEFAULT=$2
150183
shift
@@ -293,6 +326,9 @@ else
293326
step_msg "processing $CFG_SELF args"
294327
fi
295328

329+
BOOL_OPTIONS=""
330+
VAL_OPTIONS=""
331+
296332
opt sharedstd 1 "build libstd as a shared library"
297333
opt valgrind 0 "run tests with valgrind (memcheck by default)"
298334
opt helgrind 0 "run tests with helgrind instead of memcheck"
@@ -313,6 +349,10 @@ valopt llvm-root "" "set LLVM root"
313349
valopt host-triple "${DEFAULT_HOST_TRIPLE}" "LLVM host triple"
314350
valopt target-triples "${CFG_HOST_TRIPLE}" "LLVM target triples"
315351

352+
# Validate Options
353+
step_msg "validating $CFG_SELF args"
354+
validate_opt
355+
316356
if [ $HELP -eq 1 ]
317357
then
318358
echo ""

0 commit comments

Comments
 (0)