Fix Object::IsSoftReference

Also changed -Xzygote to default boot.art and log arguments

Finally Makefile work:
- separate out test dependencies
- changed zygote with art to work by replacing libdvm with libart[d]
- changed Makefile defines to name and error check their arguments
  This was to fix bug in generating ART_TARGET_EXECUTABLES
  where we used $(1) when we meant $(3)

Change-Id: I7ef6008eff1fe99b59d151b6793e8fd8ea5304d4
diff --git a/src/mark_sweep.cc b/src/mark_sweep.cc
index 79597ec..6512aef 100644
--- a/src/mark_sweep.cc
+++ b/src/mark_sweep.cc
@@ -269,7 +269,7 @@
     } else if (klass->IsPhantomReferenceClass()) {
       list = &phantom_reference_list_;
     }
-    DCHECK(list != NULL);
+    DCHECK(list != NULL) << PrettyClass(klass) << " " << std::hex << klass->GetAccessFlags();
     Heap::EnqueuePendingReference(obj, list);
   }
 }
diff --git a/src/object.h b/src/object.h
index 4a7d4bb..c8f4375 100644
--- a/src/object.h
+++ b/src/object.h
@@ -1369,7 +1369,7 @@
   }
 
   bool IsSoftReferenceClass() const {
-    return (GetAccessFlags() & ~kAccReferenceFlagsMask) == kAccClassIsReference;
+    return (GetAccessFlags() & kAccReferenceFlagsMask) == kAccClassIsReference;
   }
 
   bool IsFinalizerReferenceClass() const {
diff --git a/src/runtime.cc b/src/runtime.cc
index 4f74c67..30fb4de 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -217,7 +217,7 @@
 
   for (size_t i = 0; i < options.size(); ++i) {
     const StringPiece& option = options[i].first;
-    if (false) {
+    if (true && options[0].first == "-Xzygote") {
       LOG(INFO) << "option[" << i << "]=" << option;
     }
     if (option.starts_with("-Xbootclasspath:")) {
@@ -275,6 +275,7 @@
       parsed->jni_trace_ = option.substr(strlen("-Xjnitrace:")).data();
     } else if (option == "-Xzygote") {
       parsed->is_zygote_ = true;
+      parsed->images_.push_back("/system/framework/boot.art");
     } else if (option.starts_with("-verbose:")) {
       std::vector<std::string> verbose_options;
       Split(option.substr(strlen("-verbose:")).data(), ',', verbose_options);
diff --git a/src/thread.cc b/src/thread.cc
index 7eec6f3..cb71dcf 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -158,7 +158,6 @@
 
 void Thread::InitAfterFork() {
   InitTid();
-  InitPthread();
   InitPthreadKeySelf();
 }