src/Pure/Tools/build.scala
changeset 71613 6bce25f9d0ab
parent 71612 e0a5d6068141
child 71614 e6dead7d5334
equal deleted inserted replaced
71612:e0a5d6068141 71613:6bce25f9d0ab
   237             ("ISABELLE_EXPORT_TMP" -> File.standard_path(export_tmp_dir)) +
   237             ("ISABELLE_EXPORT_TMP" -> File.standard_path(export_tmp_dir)) +
   238             ("ISABELLE_ML_DEBUGGER" -> options.bool("ML_debugger").toString)
   238             ("ISABELLE_ML_DEBUGGER" -> options.bool("ML_debugger").toString)
   239 
   239 
   240         val is_pure = Sessions.is_pure(name)
   240         val is_pure = Sessions.is_pure(name)
   241 
   241 
   242         val eval_suffix =
   242         val eval_store =
   243         {
   243           if (!do_output) Nil
   244           val eval_pure =
   244           else {
   245             if (is_pure) List("Theory.install_pure (Thy_Info.get_theory Context.PureN)") else Nil
   245             (if (info.theories.nonEmpty) List("ML_Heap.share_common_data ()") else Nil) :::
   246           val eval_share =
   246             List("ML_Heap.save_child " +
   247             if (do_output && info.theories.nonEmpty) List("ML_Heap.share_common_data ()") else Nil
   247               ML_Syntax.print_string_bytes(File.platform_path(store.output_heap(name))))
   248           val eval_save =
   248           }
   249             if (do_output) {
       
   250               List("ML_Heap.save_child " +
       
   251                 ML_Syntax.print_string_bytes(File.platform_path(store.output_heap(name))))
       
   252             }
       
   253             else Nil
       
   254           eval_pure ::: eval_share ::: eval_save
       
   255         }
       
   256 
   249 
   257         if (pide && !is_pure) {
   250         if (pide && !is_pure) {
   258           val resources = new Resources(sessions_structure, deps(parent))
   251           val resources = new Resources(sessions_structure, deps(parent))
   259           val session = new Session(options, resources)
   252           val session = new Session(options, resources)
   260           val handler = new Handler(progress, session, name)
   253           val handler = new Handler(progress, session, name)
   278         else {
   271         else {
   279           val args_file = Isabelle_System.tmp_file("build")
   272           val args_file = Isabelle_System.tmp_file("build")
   280           File.write(args_file, args_yxml)
   273           File.write(args_file, args_yxml)
   281 
   274 
   282           val eval_build = "Build.build " + ML_Syntax.print_string_bytes(File.standard_path(args_file))
   275           val eval_build = "Build.build " + ML_Syntax.print_string_bytes(File.standard_path(args_file))
   283           val eval = Command_Line.ML_tool0(eval_build :: eval_suffix)
   276           val eval = Command_Line.ML_tool0(eval_build :: eval_store)
   284 
   277 
   285           val process =
   278           val process =
   286             if (is_pure) {
   279             if (is_pure) {
   287               ML_Process(options, deps.sessions_structure, store, raw_ml_system = true,
   280               ML_Process(options, deps.sessions_structure, store, raw_ml_system = true,
   288                 args =
   281                 args =