Changes for reading input files in MGC version
[IRC.git] / Robust / src / buildscript
index 28d65c4ca8e55cf56456137f286b4e951eda03db..ddf8cdb8f4128691e73238e5203c4f02f55641a9 100755 (executable)
@@ -94,6 +94,7 @@ echo -accurateprofile build with accurate profile information including pre/post
 echo -profile_interrupt build with profile information of interrupts
 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
 echo -gccachecoherent turns on the cache coherence during gc
+echo -inputfile enables reading input files in Tilera
 echo
 echo Multicore GC options
 echo -perfcount performance counters
@@ -275,6 +276,8 @@ TILERA_PAGE_SIZE="0x10000"
 TILERA_PAGE_SIZE_BITS="16"
 TILERA_NUM_BLOCKS="20"
 TILERA_NUM_PAGES_PER_BLOCK="16"
+INPUTFILEFLAG=false
+INPUTFILES=''
 GCCACHECOHERENTFLAG=false
 COMPILER_HEAP_SIZE="1500"
 
@@ -612,6 +615,11 @@ elif [[ $1 = '-mgc' ]]
 then
 MGCFLAG=true
 JAVAOPTS="$JAVAOPTS -mgc"
+elif [[ $1 = '-inputfile' ]]
+then
+INPUTFILEFLAG=true
+INPUTFILES="$INPUTFILES $2"
+shift
 elif [[ $1 = '-mgcintel' ]]
 then
 MGCINTELFLAG=true
@@ -971,6 +979,16 @@ else
   fi
 fi
 
+# transfer the input files
+
+if $INPUTFILEFLAG
+then
+if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx${COMPILER_HEAP_SIZE}m -classpath $ROBUSTROOT Util.InputFileTranslator \
+       -dir $BUILDDIR $INPUTFILES
+    then exit $?
+fi
+fi
+
 # after executing Main, if -justanalyze flag, just exit
 if $EXITAFTERANALYSIS
 then
@@ -1113,6 +1131,11 @@ else
 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
 fi
 
+if $INPUTFILEFLAG
+then
+TILERACFLAGS="${TILERACFLAGS} -DINPUTFILE"
+fi
+
 if $GCTBLDEBUGFLAG
 then
 TILERACFLAGS="${TILERACFLAGS} -DGC_TBL_DEBUG"