Merge "Adjust the documentation of `get_ld_config_file_apex_path`."
diff --git a/libc/Android.bp b/libc/Android.bp
index 147c2bb..92951f7 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -104,10 +104,9 @@
 
 // Defaults for native allocator libs/includes to make it
 // easier to change.
-// Enable scudo for non-svelte config by adding the line:
+// To disable scudo for the non-svelte config remove the line:
 //     product_variables: libc_scudo_product_variables,
-// to the cc_defaults below. And remove the defaults line
-// in the libc_scudo library.
+// in the cc_defaults below.
 // ========================================================
 cc_defaults {
     name: "libc_native_allocator_defaults",
@@ -117,6 +116,7 @@
         "libc_jemalloc_wrapper",
     ],
     header_libs: ["gwp_asan_headers"],
+    product_variables: libc_scudo_product_variables,
 }
 
 // Functions not implemented by jemalloc directly, or that need to
@@ -2566,7 +2566,6 @@
 
 cc_library_shared {
     name: "libc_scudo",
-    defaults: ["libc_scudo_wrapper_defaults"],
     vendor_available: true,
     stl: "none",
     system_shared_libs: [],
diff --git a/libc/bionic/malloc_common_dynamic.cpp b/libc/bionic/malloc_common_dynamic.cpp
index 06b2865..b1bf3d0 100644
--- a/libc/bionic/malloc_common_dynamic.cpp
+++ b/libc/bionic/malloc_common_dynamic.cpp
@@ -277,17 +277,10 @@
   return true;
 }
 
-// Note about USE_SCUDO. This file is compiled into libc.so and libc_scudo.so.
-// When compiled into libc_scudo.so, the libc_malloc_* libraries don't need
-// to be loaded from the runtime namespace since libc_scudo.so is not from
-// the runtime APEX, but is copied to any APEX that needs it.
-#ifndef USE_SCUDO
 extern "C" struct android_namespace_t* android_get_exported_namespace(const char* name);
-#endif
 
 void* LoadSharedLibrary(const char* shared_lib, const char* prefix, MallocDispatch* dispatch_table) {
   void* impl_handle = nullptr;
-#ifndef USE_SCUDO
   // Try to load the libc_malloc_* libs from the "runtime" namespace and then
   // fall back to dlopen() to load them from the default namespace.
   //
@@ -306,7 +299,6 @@
     };
     impl_handle = android_dlopen_ext(shared_lib, RTLD_NOW | RTLD_LOCAL, &dlextinfo);
   }
-#endif
 
   if (impl_handle == nullptr) {
     impl_handle = dlopen(shared_lib, RTLD_NOW | RTLD_LOCAL);