Merge changes from topic "nomake"
* changes:
Switch to new soong_ui dumpvar-mode
Remove unused GetHostOsArch
diff --git a/scripts/symbol.py b/scripts/symbol.py
index 7531b7d..77ee1b3 100755
--- a/scripts/symbol.py
+++ b/scripts/symbol.py
@@ -36,9 +36,7 @@
saveddir = os.getcwd()
os.chdir(ANDROID_BUILD_TOP)
try:
- cmd = ("CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core "
- "SRC_TARGET_DIR=build/target make -f build/core/config.mk "
- "dumpvar-abs-TARGET_OUT_UNSTRIPPED")
+ cmd = "build/soong/soong_ui.bash --dumpvar-mode --abs TARGET_OUT_UNSTRIPPED"
stream = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True).stdout
return os.path.join(ANDROID_BUILD_TOP, stream.read().strip())
finally:
diff --git a/testrunner/android_build.py b/testrunner/android_build.py
index 2baa5af..2bbb8f6 100644
--- a/testrunner/android_build.py
+++ b/testrunner/android_build.py
@@ -67,30 +67,6 @@
return host_out_path
-def GetHostOsArch():
- """Identify the host os and arch.
-
- Returns:
- The triple (HOST_OS, HOST_ARCH, HOST_OS-HOST_ARCH).
-
- Raises:
- AbortError: If the os and/or arch could not be found.
- """
- command = ("CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core "
- "make --no-print-directory -C \"%s\" -f build/core/config.mk "
- "dumpvar-report_config") % GetTop()
-
- # Use the shell b/c we set some env variables before the make command.
- config = subprocess.Popen(command, stdout=subprocess.PIPE,
- shell=True).communicate()[0]
- host_os = re.search("HOST_OS=(\w+)", config).group(1)
- host_arch = re.search("HOST_ARCH=(\w+)", config).group(1)
- if not (host_os and host_arch):
- logger.Log("Error: Could not get host's OS and/or ARCH")
- raise errors.AbortError
- return (host_os, host_arch, "%s-%s" % (host_os, host_arch))
-
-
def GetOutDir():
"""Returns the full pathname of the "out" of the Android development tree.
diff --git a/vndk/tools/header-checker/utils/utils.py b/vndk/tools/header-checker/utils/utils.py
index a387974..fd41413 100644
--- a/vndk/tools/header-checker/utils/utils.py
+++ b/vndk/tools/header-checker/utils/utils.py
@@ -152,15 +152,9 @@
if 'ANDROID_PRODUCT_OUT' not in os.environ:
return None
- cmd = ['make', '--no-print-directory', '-f', 'build/core/config.mk',
- 'dumpvar-' + name]
-
- environ = dict(os.environ)
- environ['CALLED_FROM_SETUP'] = 'true'
- environ['BUILD_SYSTEM'] = 'build/core'
+ cmd = ['build/soong/soong_ui.bash', '--dumpvar-mode', name]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE, env=environ,
- cwd=AOSP_DIR)
+ stderr=subprocess.PIPE, cwd=AOSP_DIR)
out, err = proc.communicate()
return out.decode('utf-8').strip()