[LLVMdev] (no subject)

John Criswell jtcriswel at gmail.com
Wed Jul 22 09:17:15 PDT 2015


On 7/22/15 10:33 AM, Kenneth Adam Miller wrote:
> I'm pretty sure that the output tells you that there's no makefile to 
> execute such commands. If you didn't know it, LLVM makes use of cmake, 
> so  you make have to generate your makefile with "cmake ." (or at 
> least that's the way I remembered it). Then type make.

That's probably not the problem.  SAFECode does not use cmake at present.

First, Nikhail, were you able to compile the other components of 
SAFECode on Windows (namely, safecode/lib and safecode/runtime)? Also, 
were you able to compile unmodified clang and use it on Windows?  You 
need to verify that these things work.  If regular Clang doesn't work on 
Windows, SAFECode Clang won't work, either.

Second, to answer your specific question, you are probably seeing this 
problem because SAFECode needs to be reintegrated into Clang. The way we 
do that is to:

1) Remove the old safecode/tools/clang directory.
2) Use svn copy to copy clang into safecode/tools/clang
3) Modify the Makefiles in safecode/tools/clang so that clang can 
compile from within the SAFECode source tree.
4) Modify safecode/tools/clang so that it runs the SAFECode passes when 
the -fmemsafety option is used.

I have done steps 1 and 2.  Peter is currently working on step 3.  I 
recommend you help him on Step 3.  Step 3 requires understanding LLVM 
Makefiles (http://llvm.org/docs/MakefileGuide.html).  I sent a patch to 
you and Peter showing how I integrated SAFECode into Clang for LLVM 
3.2.  You can use that as a guide to integrating SAFECode into LLVM 
3.7.  I have attached it here for reference.

So, to recap:

1) Let me know if regular Clang works on Windows.

2) If regular Clang works, try to help Peter with Step 3.

Regards,

John Criswell

>
> On Wed, Jul 22, 2015 at 7:10 AM, Nikhil Reddy Kothapally 
> <nikhilreddykotha at gmail.com <mailto:nikhilreddykotha at gmail.com>> wrote:
>
>     Hello,
>             I have tried a lot fix this error but am not able to can
>     you please find me a solution am trying to compile the SAFECode in
>     Cygwin Environment to work for windows.
>
>     used make -j4 command to make the files in cygwin   i have got
>     this error
>
>
>     make[5]: Leaving directory
>     '/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools/clang/include'
>         /usr/bin/cp: cannot stat
>     '/home/uidr7475/Work/LLVM_SRC/projects/safecode/tools/clang/lib/Makefile':
>     No such file or directory
>     make[5]: Entering directory
>     '/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools/clang/lib'
>     make[5]: *** No rule to make target 'all'.  Stop.
>     make[5]: Leaving directory
>     '/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools/clang/lib'
>     /home/uidr7475/Work/LLVM_SRC/Makefile.rules:862: recipe for target
>     'all' failed
>     make[4]: *** [all] Error 1
>     make[4]: Leaving directory
>     '/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools/clang'
>     /home/uidr7475/Work/LLVM_SRC/Makefile.rules:921: recipe for target
>     'clang/.makeall' failed
>     make[3]: *** [clang/.makeall] Error 2
>     make[3]: *** Waiting for unfinished jobs....
>     llvm[4]: Linking Release+Asserts Shared Library cygLTO.dll
>     llvm[4]: Building Release+Asserts Archive Library libLTO.a
>     make[4]: Leaving directory
>     '/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools/LTO'
>     make[3]: Leaving directory
>     '/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools'
>     /home/uidr7475/Work/LLVM_SRC/Makefile.rules:862: recipe for target
>     'all' failed
>     make[2]: *** [all] Error 1
>     make[2]: Leaving directory
>     '/home/uidr7475/Work/LLVM_OBJ/projects/safecode'
>     /home/uidr7475/Work/LLVM_SRC/Makefile.rules:862: recipe for target
>     'all' failed
>     make[1]: *** [all] Error 1
>     make[1]: Leaving directory '/home/uidr7475/Work/LLVM_OBJ/projects'
>     /home/uidr7475/Work/LLVM_SRC/Makefile.rules:947: recipe for target
>     'all' failed
>     make: *** [all] Error 1
>
>     Thank You,
>
>     Kind Regards,
>
>     Nikhil Reddy Kothapally
>
>     Master Student
>
>     Technische Universität Chemnitz,(Germany)
>
>     Automotive Software Engineering.
>
>     _______________________________________________
>     LLVM Developers mailing list
>     LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
>     http://llvm.cs.uiuc.edu
>     http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


-- 
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
http://www.cs.rochester.edu/u/criswell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150722/8c8c6e03/attachment.html>
-------------- next part --------------
Index: lib/CodeGen/BackendUtil.cpp
===================================================================
--- lib/CodeGen/BackendUtil.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/CodeGen/BackendUtil.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -35,6 +35,31 @@
 #include "llvm/Transforms/IPO.h"
 #include "llvm/Transforms/IPO/PassManagerBuilder.h"
 #include "llvm/Transforms/Scalar.h"
+
+#include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
+
+#include "CommonMemorySafetyPasses.h"
+#include "safecode/ArrayBoundsCheck.h"
+#include "safecode/BaggyBoundsChecks.h"
+#include "safecode/CFIChecks.h"
+#include "safecode/CStdLib.h"
+#include "safecode/DebugInstrumentation.h"
+#include "safecode/FormatStrings.h"
+#include "safecode/InitAllocas.h"
+#include "safecode/InvalidFreeChecks.h"
+#include "safecode/GEPChecks.h"
+#include "safecode/LoggingFunctions.h"
+#include "safecode/OptimizeChecks.h"
+#include "safecode/RegisterBounds.h"
+#include "safecode/RegisterRuntimeInitializer.h"
+#include "safecode/RewriteOOB.h"
+#include "safecode/SAFECodeMSCInfo.h"
+#include "safecode/SAFECodePasses.h"
+#include "safecode/SpecializeCMSCalls.h"
+#include "SoftBound/InitializeSoftBound.h"
+#include "SoftBound/SoftBoundCETSPass.h"
+
+
 using namespace clang;
 using namespace llvm;
 
@@ -267,7 +292,85 @@
       MPM->add(createStripSymbolsPass(true));
   }
 
+  // Add the memory safety passes for control-flow integrity
+  if (CodeGenOpts.MemSafety) {
+    // Make sure everything that can be in an LLVM register is.
+    MPM->add (createPromoteMemoryToRegisterPass());
+    MPM->add (createUnifyFunctionExitNodesPass());
+    MPM->add (new CFIChecks());
+  }
+
   PMBuilder.populateModulePassManager(*MPM);
+
+  if (CodeGenOpts.SoftBound) {
+    // Make sure SoftBound+CETS is run after optimization with atleast mem2reg run 
+    MPM->add(new DominatorTree());
+    MPM->add(new DominanceFrontier());
+    MPM->add(new LoopInfo());
+    MPM->add(new InitializeSoftBound());
+    MPM->add(new SoftBoundCETSPass());
+  }
+
+  // Add the memory safety passes
+  if (CodeGenOpts.MemSafety) {
+    //
+    // Add passes that record information about run-time checks.
+    //
+    MPM->add (createCommonMSCInfoPass());
+    MPM->add (createSAFECodeMSCInfoPass());
+
+    // C standard library / format string function transforms
+    MPM->add (new StringTransform());
+    if (!CodeGenOpts.BaggyBounds) {
+      MPM->add (new FormatStringTransform());
+      MPM->add (new RegisterVarargCallSites());
+      MPM->add (new LoggingFunctions());
+    }
+
+    MPM->add (new InitAllocas());
+    MPM->add (new RegisterGlobalVariables());
+    MPM->add (new RegisterMainArgs());
+    MPM->add (new InsertFreeChecks());
+    MPM->add (new RegisterCustomizedAllocation());
+    MPM->add (new RegisterFunctionByvalArguments ());
+    MPM->add (new LoopInfo ());
+    MPM->add (new DominatorTree ());
+    MPM->add (new DominanceFrontier ());
+    MPM->add (new RegisterStackObjPass ());
+    MPM->add (new RegisterRuntimeInitializer(CodeGenOpts.MemSafetyLogFile.c_str()));
+    MPM->add (new DebugInstrument());
+    MPM->add (createInstrumentMemoryAccessesPass());
+    MPM->add (new ScalarEvolution());
+    MPM->add (new ArrayBoundsCheckLocal());
+    MPM->add (new InsertGEPChecks());
+    MPM->add (createSpecializeCMSCallsPass());
+    MPM->add (createExactCheckOptPass());
+
+    MPM->add (new DominatorTree());
+    MPM->add (new ScalarEvolution());
+    MPM->add (createOptimizeImpliedFastLSChecksPass());
+
+    MPM->add (new OptimizeChecks());
+    if (CodeGenOpts.MemSafeTerminate) {
+      MPM->add (llvm::createSCTerminatePass ());
+    }
+  }
+
+  if (CodeGenOpts.BaggyBounds) {
+    MPM->add (new InsertBaggyBoundsChecks());
+  }
+
+  //
+  // Rerun the LLVM optimizations again.
+  //
+  PMBuilder.populateModulePassManager(*MPM);
+
+  // For SAFECode, do the debug instrumentation and OOB rewriting after
+  // all optimization is done.
+  if (CodeGenOpts.MemSafety) {
+    MPM->add (new DebugInstrument());
+    MPM->add (new RewriteOOB());
+  }
 }
 
 TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
Index: lib/Parse/ParseStmt.cpp
===================================================================
--- lib/Parse/ParseStmt.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/Parse/ParseStmt.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -2197,7 +2197,7 @@
   // The name in a catch exception-declaration is local to the handler and
   // shall not be redeclared in the outermost block of the handler.
   ParseScope CatchScope(this, Scope::DeclScope | Scope::ControlScope |
-                          (FnCatch ? Scope::FnCatchScope : Scope::CatchScope));
+                          (FnCatch ? Scope::FnCatchScope : 0));
 
   // exception-declaration is equivalent to '...' or a parameter-declaration
   // without default arguments.
Index: lib/Parse/ParseDeclCXX.cpp
===================================================================
--- lib/Parse/ParseDeclCXX.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/Parse/ParseDeclCXX.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -706,7 +706,8 @@
       if (SkipUntil(tok::r_paren, /*StopAtSemi=*/true, /*DontConsume=*/true)) {
         EndLoc = ConsumeParen();
       } else {
-        if (PP.isBacktrackEnabled() && Tok.is(tok::semi)) {
+        assert(Tok.is(tok::semi));
+        if (PP.isBacktrackEnabled()) {
           // Backtrack to get the location of the last token before the semi.
           PP.RevertCachedTokens(2);
           ConsumeToken(); // the semi.
Index: lib/Frontend/InitHeaderSearch.cpp
===================================================================
--- lib/Frontend/InitHeaderSearch.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/Frontend/InitHeaderSearch.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -26,6 +26,17 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/Path.h"
 
+// Include llvm/Config/config.h here as it contains the #defines
+// normally set in clang/Config/config.h.  While we have modified
+// the SAFECode configure script to configure clang/Config/config.h,
+// the current configure code does not insert any definitions into 
+// clang/Config/config.h.  While we could modify the SAFECode 
+// configure script further to handle this, there seems to be no 
+// point as long as we can piggy back on llvm/Config/config.h
+//
+//                                         JRM -- 8/26/12
+//
+#include "llvm/Config/config.h"
 #include "clang/Config/config.h" // C_INCLUDE_DIRS
 
 using namespace clang;
Index: lib/Frontend/CompilerInvocation.cpp
===================================================================
--- lib/Frontend/CompilerInvocation.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/Frontend/CompilerInvocation.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -384,6 +384,15 @@
                       Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
                       Args.hasArg(OPT_cl_fast_relaxed_math);
   Opts.UnwindTables = Args.hasArg(OPT_munwind_tables);
+  Opts.MemSafety = Args.hasArg(OPT_memsafety);
+  Opts.BaggyBounds = Args.hasArg(OPT_bbc);
+  Opts.SoftBound = Args.hasArg(OPT_softbound);
+  Opts.MemSafeTerminate = Args.hasArg(OPT_terminate);
+  if (Arg *A = Args.getLastArg(OPT_msLogFile)) {
+    Opts.MemSafetyLogFile = A->getValue();
+  } else {
+    Opts.MemSafetyLogFile = "";
+  }
   Opts.RelocationModel = Args.getLastArgValue(OPT_mrelocation_model, "pic");
   Opts.TrapFuncName = Args.getLastArgValue(OPT_ftrap_function_EQ);
   Opts.BoundsChecking = Args.getLastArgIntValue(OPT_fbounds_checking_EQ, 0,
Index: lib/Sema/IdentifierResolver.cpp
===================================================================
--- lib/Sema/IdentifierResolver.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/Sema/IdentifierResolver.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -135,13 +135,16 @@
       // of the controlled statement.
       //
       assert(S->getParent() && "No TUScope?");
+      if (S->getFlags() & Scope::FnTryScope)
+        return S->getParent()->isDeclScope(D);
       if (S->getParent()->getFlags() & Scope::ControlScope) {
-        S = S->getParent();
-        if (S->isDeclScope(D))
-          return true;
+        if (S->getParent()->getFlags() & Scope::FnCatchScope) {
+          S = S->getParent();
+          if (S->isDeclScope(D))
+            return true;
+        }
+        return S->getParent()->isDeclScope(D);
       }
-      if (S->getFlags() & Scope::FnTryCatchScope)
-        return S->getParent()->isDeclScope(D);
     }
     return false;
   }
Index: lib/Lex/Makefile
===================================================================
--- lib/Lex/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/Lex/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -12,7 +12,8 @@
 ##===----------------------------------------------------------------------===##
 
 CLANG_LEVEL := ../..
-include $(CLANG_LEVEL)/../../Makefile.config
+LEVEL := $(CLANG_LEVEL)/../..
+include $(CLANG_LEVEL)/../../Makefile.common
 
 LIBRARYNAME := clangLex
 
Index: lib/Driver/Driver.cpp
===================================================================
--- lib/Driver/Driver.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/Driver/Driver.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -38,6 +38,17 @@
 
 #include <map>
 
+// Include llvm/Config/config.h here as it contains the #defines
+// normally set in clang/Config/config.h.  While we have modified
+// the SAFECode configure script to configure clang/Config/config.h,
+// the current configure code does not insert any definitions into 
+// clang/Config/config.h.  While we could modify the SAFECode 
+// configure script further to handle this, there seems to be no 
+// point as long as we can piggy back on llvm/Config/config.h
+//
+//                                         JRM -- 8/26/12
+//
+#include "llvm/Config/config.h"  
 #include "clang/Config/config.h"
 
 using namespace clang::driver;
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/Driver/Tools.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -2523,6 +2523,30 @@
     CmdArgs.push_back(Args.MakeArgString(Twine(StackProtectorLevel)));
   }
 
+
+  // Handle the memory safety options
+  
+  if (Args.getLastArg(options::OPT_softbound)){
+    CmdArgs.push_back("-fsoftbound");
+  }
+
+  if (Args.getLastArg(options::OPT_memsafety)) {
+    CmdArgs.push_back("-fmemsafety");
+  }
+
+  if (Args.getLastArg(options::OPT_bbc)) {
+    CmdArgs.push_back("-bbc");
+  }
+
+  if (Args.getLastArg(options::OPT_terminate)) {
+    CmdArgs.push_back("-fmemsafety-terminate");
+  }
+
+  if (Arg *MemSafetyLogOpt = Args.getLastArg(options::OPT_msLogFile)) {
+    CmdArgs.push_back("-fmemsafety-logfile");
+    CmdArgs.push_back(MemSafetyLogOpt->getValue());
+  }
+
   // --param ssp-buffer-size=
   for (arg_iterator it = Args.filtered_begin(options::OPT__param),
        ie = Args.filtered_end(); it != ie; ++it) {
@@ -4778,6 +4802,37 @@
   Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
   Args.AddAllArgs(CmdArgs, options::OPT_F);
 
+  //
+  // Add in any memory safety libraries.  Even if we're not compiling C++ code,
+  // we need to link in the C++ standard libraries.
+  //
+
+  if (Args.hasArg(options::OPT_softbound)){
+    CmdArgs.push_back("-lsoftbound_rt");
+    //    CmdArgs.push_back("-lrt");
+    CmdArgs.push_back("-lm");
+    if (!Args.hasArg(options::OPT_nostdlib) &&
+        !Args.hasArg(options::OPT_nodefaultlibs)) {
+      getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
+    }
+
+  }
+
+  if (Args.hasArg(options::OPT_memsafety)) {
+    if (Args.hasArg(options::OPT_bbc)) {
+      CmdArgs.push_back("-lsc_bb_rt");
+    } else {
+      CmdArgs.push_back("-lsc_dbg_rt");
+      CmdArgs.push_back("-lpoolalloc_bitmap");
+    }
+    CmdArgs.push_back("-lgdtoa"); 
+
+    if (!Args.hasArg(options::OPT_nostdlib) &&
+        !Args.hasArg(options::OPT_nodefaultlibs)) {
+      getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
+    }
+  }
+
   const char *Exec =
     Args.MakeArgString(getToolChain().GetProgramPath("ld"));
   C.addCommand(new Command(JA, *this, Exec, CmdArgs));
@@ -5066,6 +5121,29 @@
 
   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
 
+  //
+  // Add in any memory safety libraries.
+  //
+  
+  if (Args.hasArg(options::OPT_softbound)){
+    CmdArgs.push_back("-lsoftbound_rt");
+    CmdArgs.push_back("-lstdc++");
+    CmdArgs.push_back("-lrt");
+    CmdArgs.push_back("-lm");
+  }
+
+  if (Args.hasArg(options::OPT_memsafety)) {
+    if (Args.hasArg(options::OPT_bbc)) {
+      CmdArgs.push_back("-lsc_bb_rt");
+    } else {
+      CmdArgs.push_back("-lsc_dbg_rt");
+      CmdArgs.push_back("-lpoolalloc_bitmap");
+    }
+    CmdArgs.push_back("-lgdtoa"); 
+    CmdArgs.push_back("-lstdc++");
+  }
+
+
   if (!Args.hasArg(options::OPT_nostdlib) &&
       !Args.hasArg(options::OPT_nodefaultlibs)) {
     // FIXME: For some reason GCC passes -lgcc before adding
@@ -5182,6 +5260,27 @@
 
   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
 
+  //
+  // Add in any memory safety libraries.
+  //
+  if (Args.hasArg(options::OPT_softbound)){
+    CmdArgs.push_back("-lsoftbound_rt");
+    CmdArgs.push_back("-lrt");
+    CmdArgs.push_back("-lm");
+    CmdArgs.push_back("-lstdc++");
+  }
+  
+  if (Args.hasArg(options::OPT_memsafety)) {
+    if (Args.hasArg(options::OPT_bbc)) {
+      CmdArgs.push_back("-lsc_bb_rt");
+    } else {
+      CmdArgs.push_back("-lsc_dbg_rt");
+      CmdArgs.push_back("-lpoolalloc_bitmap");
+    }
+    CmdArgs.push_back("-lgdtoa"); 
+    CmdArgs.push_back("-lstdc++");
+  }
+
   if (!Args.hasArg(options::OPT_nostdlib) &&
       !Args.hasArg(options::OPT_nodefaultlibs)) {
     if (D.CCCIsCXX) {
@@ -5546,6 +5645,27 @@
 
   AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs);
 
+ //
+ // Add in any memory safety libraries.
+ //
+ if (Args.hasArg(options::OPT_softbound)){
+    CmdArgs.push_back("-lsoftbound_rt");
+    CmdArgs.push_back("-lstdc++");
+    CmdArgs.push_back("-lrt");
+    CmdArgs.push_back("-lm");
+  }
+  
+  if (Args.hasArg(options::OPT_memsafety)) {
+    if (Args.hasArg(options::OPT_bbc)) {
+      CmdArgs.push_back("-lsc_bb_rt");
+    } else {
+      CmdArgs.push_back("-lsc_dbg_rt");
+      CmdArgs.push_back("-lpoolalloc_bitmap");
+    }    
+    CmdArgs.push_back("-lgdtoa"); 
+    CmdArgs.push_back("-lstdc++");
+  }
+
   if (!Args.hasArg(options::OPT_nostdlib) &&
       !Args.hasArg(options::OPT_nodefaultlibs)) {
     if (D.CCCIsCXX) {
@@ -5716,6 +5836,27 @@
 
   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
 
+ //
+ // Add in any memory safety libraries.
+ //
+ if (Args.hasArg(options::OPT_softbound)){
+    CmdArgs.push_back("-lsoftbound_rt");
+    CmdArgs.push_back("-lstdc++");
+    CmdArgs.push_back("-lrt");
+    CmdArgs.push_back("-lm");
+  }
+
+  if (Args.hasArg(options::OPT_memsafety)) {
+    if (Args.hasArg(options::OPT_bbc)) {
+      CmdArgs.push_back("-lsc_bb_rt");
+    } else {
+      CmdArgs.push_back("-lsc_dbg_rt");
+      CmdArgs.push_back("-lpoolalloc_bitmap");
+    }
+    CmdArgs.push_back("-lgdtoa");
+    CmdArgs.push_back("-lstdc++");
+  }
+
   if (!Args.hasArg(options::OPT_nostdlib) &&
       !Args.hasArg(options::OPT_nodefaultlibs)) {
     if (D.CCCIsCXX) {
@@ -6060,6 +6201,26 @@
 
   SanitizerArgs Sanitize(D, Args);
 
+  // Add in any memory safety libraries.
+  //
+  if (Args.hasArg(options::OPT_softbound)){
+    CmdArgs.push_back("-lsoftbound_rt");
+    CmdArgs.push_back("-lrt");
+    CmdArgs.push_back("-lm");
+    CmdArgs.push_back("-lstdc++");
+  }
+
+  if (Args.hasArg(options::OPT_memsafety)) {
+    if (Args.hasArg(options::OPT_bbc)) {
+      CmdArgs.push_back("-lsc_bb_rt");
+    } else {
+      CmdArgs.push_back("-lsc_dbg_rt");
+      CmdArgs.push_back("-lpoolalloc_bitmap");
+    }
+    CmdArgs.push_back("-lgdtoa");
+    CmdArgs.push_back("-lstdc++");
+  }
+
   // Call this before we add the C++ ABI library.
   if (Sanitize.needsUbsanRt())
     addUbsanRTLinux(getToolChain(), Args, CmdArgs);
@@ -6175,6 +6336,26 @@
 
   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
 
+  //
+  // Add in any memory safety libraries.
+  //
+  if (Args.hasArg(options::OPT_softbound)){
+    CmdArgs.push_back("-lsoftbound_rt");
+    CmdArgs.push_back("-lrt");
+    CmdArgs.push_back("-lm");
+    CmdArgs.push_back("-lstdc++");
+  }
+  if (Args.hasArg(options::OPT_memsafety)) {
+    if (Args.hasArg(options::OPT_bbc)) {
+      CmdArgs.push_back("-lsc_bb_rt");
+    } else {
+      CmdArgs.push_back("-lsc_dbg_rt");
+      CmdArgs.push_back("-lpoolalloc_bitmap");
+    }
+    CmdArgs.push_back("-lgdtoa");
+    CmdArgs.push_back("-lstdc++");
+  }
+
   addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
 
   if (!Args.hasArg(options::OPT_nostdlib) &&
@@ -6291,6 +6472,25 @@
   Args.AddAllArgs(CmdArgs, options::OPT_e);
 
   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
+  //
+  // Add in any memory safety libraries.
+  //
+  if (Args.hasArg(options::OPT_softbound)){
+    CmdArgs.push_back("-lsoftbound_rt");
+    CmdArgs.push_back("-lrt");
+    CmdArgs.push_back("-lm");
+    CmdArgs.push_back("-lstdc++");
+  }
+  if (Args.hasArg(options::OPT_memsafety)) {
+    if (Args.hasArg(options::OPT_bbc)) {
+      CmdArgs.push_back("-lsc_bb_rt");
+    } else {
+      CmdArgs.push_back("-lsc_dbg_rt");
+      CmdArgs.push_back("-lpoolalloc_bitmap");
+    }
+    CmdArgs.push_back("-lgdtoa");
+    CmdArgs.push_back("-lstdc++");
+  }
 
   if (!Args.hasArg(options::OPT_nostdlib) &&
       !Args.hasArg(options::OPT_nodefaultlibs)) {

Property changes on: lib/Driver/Tools.cpp
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /cfe/branches/release_32/lib/Driver/Tools.cpp:r167704-169383
   Merged /cfe/trunk/lib/Driver/Tools.cpp:r163908-167703,167918,167925,167935,168269,168277-168278,168303,168355,168379,168674,168818
   Merged /safecode/trunk/tools/clang/lib/Driver/Tools.cpp:r161304
   Merged /safecode/branches/release_30/tools/clang/lib/Driver/Tools.cpp:r161128-166576
Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ lib/Driver/ToolChains.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -35,6 +35,17 @@
 
 #include <cstdlib> // ::getenv
 
+// Include llvm/Config/config.h here as it contains the #defines
+// normally set in clang/Config/config.h.  While we have modified
+// the SAFECode configure script to configure clang/Config/config.h,
+// the current configure code does not insert any definitions into 
+// clang/Config/config.h.  While we could modify the SAFECode 
+// configure script further to handle this, there seems to be no 
+// point as long as we can piggy back on llvm/Config/config.h
+//
+//                                         JRM -- 8/26/12
+//
+#include "llvm/Config/config.h"
 #include "clang/Config/config.h" // for GCC_INSTALL_PREFIX
 
 using namespace clang::driver;
@@ -1855,8 +1866,6 @@
   UbuntuNatty,
   UbuntuOneiric,
   UbuntuPrecise,
-  UbuntuQuantal,
-  UbuntuRaring,
   UnknownDistro
 };
 
@@ -1874,7 +1883,7 @@
 }
 
 static bool IsUbuntu(enum LinuxDistro Distro) {
-  return Distro >= UbuntuHardy && Distro <= UbuntuRaring;
+  return Distro >= UbuntuHardy && Distro <= UbuntuPrecise;
 }
 
 static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
@@ -1896,8 +1905,6 @@
           .Case("natty", UbuntuNatty)
           .Case("oneiric", UbuntuOneiric)
           .Case("precise", UbuntuPrecise)
-          .Case("quantal", UbuntuQuantal)
-          .Case("raring", UbuntuRaring)
           .Default(UnknownDistro);
     return Version;
   }
Index: Makefile
===================================================================
--- Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -67,9 +67,14 @@
 # Set up Clang's tblgen.
 ifndef CLANG_TBLGEN
   ifeq ($(LLVM_CROSS_COMPILING),1)
+    # this clause should probably be altered for SAFECode as well,
+    # but I'm not sure what to do with it.
+    #
+    # 				-- JRM - 12/08/27
+    #
     CLANG_TBLGEN := $(BuildLLVMToolDir)/clang-tblgen$(BUILD_EXEEXT)
   else
-    CLANG_TBLGEN := $(LLVMToolDir)/clang-tblgen$(EXEEXT)
+    CLANG_TBLGEN := $(ToolDir)/clang-tblgen$(EXEEXT)
   endif
 endif
 ClangTableGen = $(CLANG_TBLGEN) $(TableGen.Flags)
Index: test/Parser/bracket-crash.cpp
===================================================================
--- test/Parser/bracket-crash.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ test/Parser/bracket-crash.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -4,6 +4,3 @@
 struct{
   a
 }
-
-// PR14549. Must be at end of file.
-decltype(
Index: test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
===================================================================
--- test/CXX/basic/basic.scope/basic.scope.local/p2.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ test/CXX/basic/basic.scope/basic.scope.local/p2.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -35,26 +35,3 @@
     int i; // expected-error{{redefinition of 'i'}}
   }
 }
-
-void func8() {
-  int i;
-  try {
-    int i;
-  } catch (...) {
-  }
-}
-
-void func9() {
-  if (bool b = true)
-    try {
-      int b; // FIXME: this probably should be invalid, maybe
-    } catch (...) {
-    }
-}
-
-void func10() {
-  if (bool b = true)
-    if (true) {
-      int b; // FIXME: decide whether this is valid
-    }
-}
Index: test/SemaCXX/warn-unreachable.cpp
===================================================================
--- test/SemaCXX/warn-unreachable.cpp	(.../cfe/branches/release_32)	(revision 242032)
+++ test/SemaCXX/warn-unreachable.cpp	(.../safecode/branches/release_32/tools/clang)	(revision 242032)

Property changes on: test/SemaCXX/warn-unreachable.cpp
___________________________________________________________________
Modified: svn:mergeinfo
   Reverse-merged /cfe/trunk/test/SemaCXX/warn-unreachable.cpp:r121961
   Merged /cfe/trunk/test/SemaCXX/warn-unreachable.cpp:r163908-167703
   Merged /safecode/trunk/tools/clang/test/SemaCXX/warn-unreachable.cpp:r161304
   Merged /safecode/branches/release_30/tools/clang/test/SemaCXX/warn-unreachable.cpp:r161128-166576
   Merged /cfe/branches/release_32/test/SemaCXX/warn-unreachable.cpp:r167704-169383
Index: test/Driver/pic.c
===================================================================
--- test/Driver/pic.c	(.../cfe/branches/release_32)	(revision 242032)
+++ test/Driver/pic.c	(.../safecode/branches/release_32/tools/clang)	(revision 242032)

Property changes on: test/Driver/pic.c
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /safecode/branches/release_30/tools/clang/test/Driver/pic.c:r161128-166576
   Merged /cfe/branches/release_32/test/Driver/pic.c:r167704-168525,168538-169383
   Merged /cfe/trunk/test/Driver/pic.c:r163908-167703,167918,167925,167935,168063,168269,168277-168278,168303,168355,168379,168674,168818
   Merged /safecode/trunk/tools/clang/test/Driver/pic.c:r161304
Index: runtime/Makefile
===================================================================
--- runtime/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ runtime/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -8,8 +8,11 @@
 ##===----------------------------------------------------------------------===##
 
 CLANG_LEVEL := ..
-include $(CLANG_LEVEL)/../../Makefile.config
 
+LEVEL := $(CLANG_LEVEL)/../..
+
+include $(CLANG_LEVEL)/../../Makefile.common
+
 ifndef NO_RUNTIME_LIBS
 
 PARALLEL_DIRS  := compiler-rt libcxx
Index: include/clang/Frontend/CodeGenOptions.h
===================================================================
--- include/clang/Frontend/CodeGenOptions.h	(.../cfe/branches/release_32)	(revision 242032)
+++ include/clang/Frontend/CodeGenOptions.h	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -106,6 +106,9 @@
   /// A list of command-line options to forward to the LLVM backend.
   std::vector<std::string> BackendOptions;
 
+  /// The filename to use for logging memory safety violations
+  std::string MemSafetyLogFile;
+
 public:
   // Define accessors/mutators for code generation options of enumeration type.
 #define CODEGENOPT(Name, Bits, Default)
Index: include/clang/Frontend/CodeGenOptions.def
===================================================================
--- include/clang/Frontend/CodeGenOptions.def	(.../cfe/branches/release_32)	(revision 242032)
+++ include/clang/Frontend/CodeGenOptions.def	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -91,6 +91,12 @@
 CODEGENOPT(UnsafeFPMath      , 1, 0) ///< Allow unsafe floating point optzns.
 CODEGENOPT(UnwindTables      , 1, 0) ///< Emit unwind tables.
 
+CODEGENOPT(MemSafety         , 1, 0) /// Instrument code with memory safety checks
+CODEGENOPT(BaggyBounds       , 1, 0) /// Use Baggy Bounds Checking
+CODEGENOPT(MemSafeTerminate  , 1, 0) /// Terminate program on failed memsafe checks
+CODEGENOPT(SoftBound         , 1, 0) /// SoftBound+CETS pointer based checking
+
+
   /// Attempt to use register sized accesses to bit-fields in structures, when
   /// possible.
 CODEGENOPT(UseRegisterSizedBitfieldAccess , 1, 0)
Index: include/clang/Sema/Scope.h
===================================================================
--- include/clang/Sema/Scope.h	(.../cfe/branches/release_32)	(revision 242032)
+++ include/clang/Sema/Scope.h	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -84,18 +84,11 @@
     /// TryScope - This is the scope of a C++ try statement.
     TryScope = 0x1000,
 
-    /// CatchScope - This is the scope of a C++ catch statement.
-    CatchScope = 0x2000,
-
-    /// FnTryCatchScope - This is the scope for a function-level C++ try or
-    /// catch scope.
-    FnTryCatchScope = 0x4000,
-
     /// FnTryScope - This is the scope of a function-level C++ try scope.
-    FnTryScope = TryScope | FnTryCatchScope,
+    FnTryScope = 0x3000,
 
     /// FnCatchScope - This is the scope of a function-level C++ catch scope.
-    FnCatchScope = CatchScope | FnTryCatchScope
+    FnCatchScope = 0x4000
   };
 private:
   /// The parent scope for this scope.  This is null for the translation-unit
Index: include/clang/Driver/CC1Options.td
===================================================================
--- include/clang/Driver/CC1Options.td	(.../cfe/branches/release_32)	(revision 242032)
+++ include/clang/Driver/CC1Options.td	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -526,6 +526,22 @@
   HelpText<"OpenCL language standard to compile for">;
 
 //===----------------------------------------------------------------------===//
+// Memory Safety Options
+//===----------------------------------------------------------------------===//
+
+def memsafety : Flag<["-"], "fmemsafety">,
+  HelpText<"Instrument program with memory-safety checks">;
+def bbc : Flag<["-"], "bbc">,
+  HelpText<"Use Baggy Bounds Checking">;
+def msLogFile : Separate<["-"], "fmemsafety-logfile">,
+    MetaVarName<"<path>">, HelpText<"Specify memory safety checks log file">;
+def terminate : Flag<["-"], "fmemsafety-terminate">,
+ HelpText<"Terminate program on failed memory-safety checks">;
+def softbound: Flag<["-"], "fsoftbound">,
+ HelpText<"Instrument program with SoftBound+CETS style pointer based memory safety checks">;
+
+
+//===----------------------------------------------------------------------===//
 // CUDA Options
 //===----------------------------------------------------------------------===//
 
Index: docs/ReleaseNotes.html
===================================================================
--- docs/ReleaseNotes.html	(.../cfe/branches/release_32)	(revision 242032)
+++ docs/ReleaseNotes.html	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -43,6 +43,12 @@
   <p>Written by the <a href="http://llvm.org/">LLVM Team</a></p>
 </div>
 
+<h1 style="color:red">These are in-progress notes for the upcoming Clang 3.2
+release.<br>
+You may prefer the
+<a href="http://llvm.org/releases/3.1/docs/ClangReleaseNotes.html">Clang 3.1
+Release Notes</a>.</h1>
+
 <!-- ======================================================================= -->
 <h2 id="intro">Introduction</h2>
 <!-- ======================================================================= -->
@@ -85,7 +91,7 @@
 them. The improvements since the 3.1 release include:</p>
 
 <ul>
-  <li><tt>-Wuninitialized</tt> has been taught to recognize uninitialized uses
+  <li><tt>-Wuninitialized</tt> has been taught to recognise uninitialized uses
   which always occur when an explicitly-written non-constant condition is either
   <tt>true</tt> or <tt>false</tt>. For example:
 
@@ -164,11 +170,14 @@
 
   </li>
 
-  <li>The Address Sanitizer feature and Clang's <tt>-fcatch-undefined-behavior</tt> option have been moved to a unified flag set: 
-  <tt>-fsanitize</tt>. This flag can be used to enable the different dynamic checking tools when building. For example,
-  <tt>-faddress-sanitizer</tt> is now <tt>-fsanitize=address</tt>, and <tt>-fcatch-undefined-behavior</tt> is now 
-  <tt>-fsanitize=undefined</tt>. With this release the set of checks available continues to grow, see the Clang
-  documentation and specific sanitizer notes below for details.
+  <li>Clang's <tt>-fcatch-undefined-behavior</tt> option has been renamed to
+  <tt>-fsanitize=undefined</tt> and has grown the ability to check for several
+  new types of undefined behavior. See the Users Manual for more information.
+
+  <!-- Flesh this out prior to release. -->
+
+  <!-- Document renaming of -faddress-sanitizer and -fthread-sanitizer. -->
+
   </li>
 
 </ul>
@@ -206,35 +215,6 @@
 <code>pointer_with_type_tag</code> and <code>type_tag_for_datatype</code>
 attributes in Clang language extensions documentation.</p>
 
-<h4>Documentation comment support</h4>
-<p>Clang now supports documentation comments written in a Doxygen-like syntax.
-Clang parses the comments and can detect syntactic and semantic errors in
-comments.  These warnings are off by default.  Pass <tt>-Wdocumentation</tt>
-flag to enable warnings about documentation comments.</p>
-
-<p>For example, given:</p>
-
-<pre>/// \param [in] Str the string.
-/// \returns a modified string.
-void do_something(const std::string &str);</pre>
-
-<p><tt>clang -Wdocumentation</tt> will emit two warnings:</p>
-
-<pre><b>doc-test.cc:3:6: <span class="warning">warning:</span></b> '\returns' command used in a comment that is attached to a function returning void [-Wdocumentation]
-/// \returns a modified string.
-    <span class="caret">~^~~~~~~~~~~~~~~~~~~~~~~~~~</span>
-<b>doc-test.cc:2:17: <span class="warning">warning:</span></b> parameter 'Str' not found in the function declaration [-Wdocumentation]
-/// \param [in] Str the string.
-                <span class="caret">^~~</span>
-<b>doc-test.cc:2:17: <span class="note">note:</span></b> did you mean 'str'?
-/// \param [in] Str the string.
-                <span class="caret">^~~</span>
-                <span class="caret">str</span></pre>
-
-<p>libclang includes a new API, <tt>clang_FullComment_getAsXML</tt>, to convert
-comments to XML documents.  This API can be used to build documentation
-extraction tools.</p>
-
 <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
 <h3 id="newflags">New Compiler Flags</h3>
 <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
@@ -259,8 +239,7 @@
 
 <h4 id="c11changes">C11 Feature Support</h4>
 
-<p>Clang 3.2 adds support for the C11 <code>_Alignof</code> keyword, pedantic warning through option
-       <code>-Wempty-translation-unit</code> (C11 6.9p1) </p>
+<p>...</p>
 
 <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
 <h3 id="cxxchanges">C++ Language Changes in Clang</h3>
@@ -268,42 +247,40 @@
 
 <h4 id="cxx11changes">C++11 Feature Support</h4>
 
-<p>Clang 3.2 supports <a href="http://clang.llvm.org/cxx_status.html#cxx11">most of the language features</a> 
-       added in the latest ISO C++ standard,<a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">C++ 2011</a>.
-       Use <code>-std=c++11</code> or <code>-std=gnu++11</code> to enable support for these features. In addition to the features supported by Clang 3.1, the
-       following features have been added:</p>
+<p>...</p>
 
-<ul>
- <li>Implemented the C++11 discarded value expression rules for volatile lvalues.</li>
- <li>Support for the C++11 enum forward declarations.</li>
- <li>Handling of C++11 attribute namespaces (automatically).</li>
- <li>Implemented C++11 [conv.prom]p4: an enumeration with a fixed underlying type has integral promotions 
-         to both its underlying type and to its underlying type's promoted type.</li>
-</ul>
-
 <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
 <h3 id="objcchanges">Objective-C Language Changes in Clang</h3>
 <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
 
-<p>Bug-fixes, no functionality changes.</p>
+<p>...</p>
 
 <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
+<h3 id="apichanges">Internal API Changes</h3>
+<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
+
+<p>These are major API changes that have happened since the 3.1 release of
+   Clang. If upgrading an external codebase that uses Clang as a library, this
+   section should help get you past the largest hurdles of upgrading.</p>
+
+<h4 id="api1">API change 1</h4>
+
+<p>...</p>
+
+<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
 <h3 id="pythonchanges">Python Binding Changes</h3>
 <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
 
-The following classes and methods have been added:
+The following methods have been added:
 <ul>
-   <li>class CompilationDatabaseError(Exception)</li>
-   <li>class CompileCommand(object)</li>
-   <li>class CompileCommands(object)</li>
-   <li>class CompilationDatabase(ClangObject)</li>
-  <li>Cursor.is_static_method</li>
-  <li>Cursor.is_static_method</li>
-  <li>SourceLocation.from_offset</li>
-  <li>Cursor.is_static_method</li>
+  <li>...</li>
 </ul>
 
 <!-- ======================================================================= -->
+<h2 id="knownproblems">Significant Known Problems</h2>
+<!-- ======================================================================= -->
+
+<!-- ======================================================================= -->
 <h2 id="additionalinfo">Additional Information</h2>
 <!-- ======================================================================= -->
 
@@ -319,7 +296,18 @@
    the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev"> mailing
    list</a>.</p>
 
+<!-- ======================================================================= -->
+<!-- Likely 3.1 release notes -->
+<!-- ======================================================================= -->
+<!--
+This is just a section to hold things that have already gotten started and
+should likely pick up proper release notes in 3.1.
 
+- C1X and C++11 atomics infrastructure and support
+- CUDA support?
+
+-->
+
 </div>
 </body>
 </html>
Index: utils/TableGen/Makefile
===================================================================
--- utils/TableGen/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ utils/TableGen/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -9,7 +9,7 @@
 
 LEVEL = ../../../..
 TOOLNAME = clang-tblgen
-USEDLIBS = LLVMTableGen.a LLVMSupport.a
+LLVMLIBS = LLVMTableGen.a LLVMSupport.a
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1
Index: tools/driver/Makefile
===================================================================
--- tools/driver/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ tools/driver/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -14,7 +14,7 @@
 # We don't currently expect production Clang builds to be interested in
 # plugins. This is important for startup performance.
 ifdef CLANG_IS_PRODUCTION
-TOOL_NO_EXPORTS := 1
+#TOOL_NO_EXPORTS := 1
 endif
 
 ifdef CLANG_ORDER_FILE
@@ -22,22 +22,29 @@
 endif
 
 # Include tool version information on OS X.
-TOOL_INFO_PLIST := Info.plist
+#TOOL_INFO_PLIST := Info.plist
 
 # Include this here so we can get the configuration of the targets that have
 # been configured for construction. We have to do this early so we can set up
 # LINK_COMPONENTS before including Makefile.rules
-include $(CLANG_LEVEL)/../../Makefile.config
 
+LEVEL := $(CLANG_LEVEL)/../..
+
+include $(CLANG_LEVEL)/../../Makefile.common
+
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
-                   instrumentation ipo linker selectiondag
+                   instrumentation ipo linker Core selectiondag
 USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
            clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
            clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
            clangStaticAnalyzerCore.a \
            clangAnalysis.a clangARCMigrate.a \
            clangRewriteFrontend.a clangRewriteCore.a \
-           clangEdit.a clangAST.a clangLex.a clangBasic.a
+           clangEdit.a clangAST.a clangLex.a clangBasic.a \
+           \
+           abc.a addchecks.a sc-support.a baggyboundscheck.a debuginstr.a \
+           softbound.a formatstrings.a convert.a cstdlib.a optchecks.a oob.a \
+           cmspasses.a
 
 include $(CLANG_LEVEL)/Makefile
 
Index: tools/libclang/Makefile
===================================================================
--- tools/libclang/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ tools/libclang/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -10,12 +10,14 @@
 CLANG_LEVEL := ../..
 LIBRARYNAME = clang
 
-EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
+#EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
 
 LINK_LIBS_IN_SHARED = 1
 SHARED_LIBRARY = 1
 
-include $(CLANG_LEVEL)/../../Makefile.config
+LEVEL := $(CLANG_LEVEL)/../..
+
+include $(CLANG_LEVEL)/../../Makefile.common
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 USEDLIBS = clangARCMigrate.a clangRewriteCore.a clangRewriteFrontend.a \
 	   clangFrontend.a clangDriver.a \
Index: tools/Makefile
===================================================================
--- tools/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ tools/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -9,8 +9,10 @@
 
 CLANG_LEVEL := ..
 
-include $(CLANG_LEVEL)/../../Makefile.config
+LEVEL := $(CLANG_LEVEL)/../..
 
+include $(CLANG_LEVEL)/../../Makefile.common
+
 DIRS := driver libclang c-index-test arcmt-test c-arcmt-test diagtool \
         clang-check
 
Index: tools/clang-check/Makefile
===================================================================
--- tools/clang-check/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ tools/clang-check/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -9,12 +9,14 @@
 
 CLANG_LEVEL := ../..
 
+LEVEL := $(CLANG_LEVEL)/../..
+
 TOOLNAME = clang-check
 
 # No plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+#TOOL_NO_EXPORTS = 1
 
-include $(CLANG_LEVEL)/../../Makefile.config
+include $(CLANG_LEVEL)/../../Makefile.common
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a \
            clangTooling.a clangParse.a clangSema.a clangAnalysis.a \
Index: tools/diagtool/Makefile
===================================================================
--- tools/diagtool/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ tools/diagtool/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -8,15 +8,17 @@
 ##===----------------------------------------------------------------------===##
 CLANG_LEVEL := ../..
 
+LEVEL := $(CLANG_LEVEL)/../..
+
 TOOLNAME = diagtool 
 
 # No plugins, optimize startup time.
-TOOL_NO_EXPORTS := 1
+#TOOL_NO_EXPORTS := 1
 
 # Don't install this.
 NO_INSTALL = 1
 
-include $(CLANG_LEVEL)/../../Makefile.config
+include $(CLANG_LEVEL)/../../Makefile.common
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
            clangSema.a clangAnalysis.a clangEdit.a clangAST.a clangLex.a \
Index: tools/arcmt-test/Makefile
===================================================================
--- tools/arcmt-test/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ tools/arcmt-test/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -8,15 +8,17 @@
 ##===----------------------------------------------------------------------===##
 CLANG_LEVEL := ../..
 
+LEVEL := $(CLANG_LEVEL)/../..
+
 TOOLNAME = arcmt-test
 
 # No plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+#TOOL_NO_EXPORTS = 1
 
 # Don't install this. It is used for tests.
 NO_INSTALL = 1
 
-include $(CLANG_LEVEL)/../../Makefile.config
+include $(CLANG_LEVEL)/../../Makefile.common
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 USEDLIBS = clangARCMigrate.a clangRewriteCore.a \
 		 clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
Index: tools/c-arcmt-test/Makefile
===================================================================
--- tools/c-arcmt-test/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ tools/c-arcmt-test/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -8,10 +8,12 @@
 ##===----------------------------------------------------------------------===##
 CLANG_LEVEL := ../..
 
+LEVEL := $(CLANG_LEVEL)/../..
+
 TOOLNAME = c-arcmt-test
 
 # No plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+#TOOL_NO_EXPORTS = 1
 
 # Don't install this. It is used for tests.
 NO_INSTALL = 1
@@ -19,7 +21,7 @@
 # Include this here so we can get the configuration of the targets that have
 # been configured for construction. We have to do this early so we can set up
 # LINK_COMPONENTS before including Makefile.rules
-include $(CLANG_LEVEL)/../../Makefile.config
+include $(CLANG_LEVEL)/../../Makefile.common
 
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 
Index: tools/c-index-test/Makefile
===================================================================
--- tools/c-index-test/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ tools/c-index-test/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -8,6 +8,9 @@
 ##===----------------------------------------------------------------------===##
 CLANG_LEVEL := ../..
 
+LEVEL := $(CLANG_LEVEL)/../..
+
+
 TOOLNAME = c-index-test
 
 # If a separate install prefix was specified for internal tools, use it
@@ -15,12 +18,12 @@
 INTERNAL_TOOL = 1
 
 # No plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+#TOOL_NO_EXPORTS = 1
 
 # Include this here so we can get the configuration of the targets that have
 # been configured for construction. We have to do this early so we can set up
 # LINK_COMPONENTS before including Makefile.rules
-include $(CLANG_LEVEL)/../../Makefile.config
+include $(CLANG_LEVEL)/../../Makefile.common
 
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 USEDLIBS = clang.a clangFrontend.a clangDriver.a \
Index: unittests/Tooling/Makefile
===================================================================
--- unittests/Tooling/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ unittests/Tooling/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -8,8 +8,9 @@
 ##===----------------------------------------------------------------------===##
 
 CLANG_LEVEL = ../..
+LEVEL := $(CLANG_LEVEL)/../..
 TESTNAME = Tooling
-include $(CLANG_LEVEL)/../../Makefile.config
+include $(CLANG_LEVEL)/../../Makefile.common
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
            clangParse.a clangRewriteCore.a clangRewriteFrontend.a \
Index: unittests/Makefile
===================================================================
--- unittests/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ unittests/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -18,6 +18,8 @@
 
 endif  # CLANG_LEVEL
 
+LEVEL := $(CLANG_LEVEL)/../..
+
 include $(CLANG_LEVEL)/Makefile
 
 ifndef IS_UNITTEST_LEVEL
Index: unittests/ASTMatchers/Makefile
===================================================================
--- unittests/ASTMatchers/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ unittests/ASTMatchers/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -9,8 +9,10 @@
 
 CLANG_LEVEL = ../..
 
+LEVEL := $(CLANG_LEVEL)/../..
+
 TESTNAME = ASTMatchers
-include $(CLANG_LEVEL)/../../Makefile.config
+include $(CLANG_LEVEL)/../../Makefile.common
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
            clangRewriteCore.a clangRewriteFrontend.a \
Index: unittests/Frontend/Makefile
===================================================================
--- unittests/Frontend/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ unittests/Frontend/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -8,8 +8,9 @@
 ##===----------------------------------------------------------------------===##
 
 CLANG_LEVEL = ../..
+LEVEL := $(CLANG_LEVEL)/../..
 TESTNAME = Frontend
-include $(CLANG_LEVEL)/../../Makefile.config
+include $(CLANG_LEVEL)/../../Makefile.common
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
            clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
Index: unittests/AST/Makefile
===================================================================
--- unittests/AST/Makefile	(.../cfe/branches/release_32)	(revision 242032)
+++ unittests/AST/Makefile	(.../safecode/branches/release_32/tools/clang)	(revision 242032)
@@ -8,8 +8,9 @@
 ##===----------------------------------------------------------------------===##
 
 CLANG_LEVEL = ../..
+LEVEL := $(CLANG_LEVEL)/../..
 TESTNAME = AST
-include $(CLANG_LEVEL)/../../Makefile.config
+include $(CLANG_LEVEL)/../../Makefile.common
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
 USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
            clangRewriteCore.a clangRewriteFrontend.a \
Index: .
===================================================================
--- .	(.../cfe/branches/release_32)	(revision 242032)
+++ .	(.../safecode/branches/release_32/tools/clang)	(revision 242032)

Property changes on: .
___________________________________________________________________
Modified: svn:mergeinfo
   Reverse-merged /cfe/trunk:r167766,169084,169688,170147
   Merged /cfe/trunk:r163908-167703
   Merged /safecode/trunk/tools/clang:r161304
   Merged /safecode/branches/release_30/tools/clang:r161128-166576
   Merged /cfe/branches/release_32:r167704-169383


More information about the llvm-dev mailing list