Index: third_party/android_platform/development/scripts/stack |
diff --git a/third_party/android_platform/development/scripts/stack b/third_party/android_platform/development/scripts/stack |
index 6901ad5896e18dcbad99d557ecb489e0cf02922d..5ac4d56768e6f4b54cbb591ad9479c3d9a6ba6a9 100755 |
--- a/third_party/android_platform/development/scripts/stack |
+++ b/third_party/android_platform/development/scripts/stack |
@@ -28,6 +28,12 @@ import subprocess |
import symbol |
import sys |
rmcilroy
2016/02/03 12:35:39
Please update src/third_party/android_platform/REA
agrieve
2016/02/03 20:27:17
Done.
|
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), |
+ os.pardir, os.pardir, os.pardir, os.pardir, |
+ 'build', 'android')) |
+from pylib import constants |
rmcilroy
2016/02/03 12:35:39
I'd rather not do this. Since this script comes fr
agrieve
2016/02/03 20:27:17
We already import constants within symbol.py, so i
rmcilroy
2016/02/04 11:36:42
You are right, ok.
|
+ |
+ |
DEFAULT_SYMROOT='/tmp/symbols' |
DEFAULT_APK_DIR='chrome_apk' |
# From: https://source.android.com/source/build-numbers.html |
@@ -45,8 +51,10 @@ def PrintUsage(): |
print " --chrome-symbols-dir=path" |
print " the path to a Chrome symbols dir (can be absolute or relative" |
print " to src), such as =out/Debug/lib" |
- print " If not specified, will look for the newest lib in out/Debug or" |
- print " out/Release" |
+ print " --output-directory=path" |
+ print " the path to the build output directory, such as out/Debug." |
+ print " Ignored if --chrome-symbols-dir is passed." |
print " --packed-relocation-adjustments" |
print " --no-packed-relocation-adjustments" |
@@ -139,6 +147,7 @@ def main(argv): |
"less-info", |
"chrome-symbols-dir=", |
"chrome-apk-dir=", |
+ "output-directory=", |
"symbols-dir=", |
"symbols-zip=", |
"arch=", |
@@ -147,6 +156,8 @@ def main(argv): |
except getopt.GetoptError, unused_error: |
PrintUsage() |
+ constants.require_explicit_output_dir = True |
+ |
zip_arg = None |
more_info = False |
chrome_apk_dir = None |
@@ -164,6 +175,8 @@ def main(argv): |
symbol.CHROME_SYMBOLS_DIR = os.path.join(symbol.CHROME_SRC, value) |
elif option == "--chrome-apk-dir": |
chrome_apk_dir = os.path.join(symbol.CHROME_SRC, value) |
+ elif option == "--output-directory": |
+ constants.SetOutputDirectory(value) |
elif option == "--packed-relocation-adjustments": |
packed_relocation_adjustments = True |
elif option == "--no-packed-relocation-adjustments": |
@@ -182,6 +195,9 @@ def main(argv): |
if len(arguments) > 1: |
PrintUsage() |
+ # Do an up-front test that the output directory is known. |
+ constants.GetOutDirectory() |
+ |
if not arguments or arguments[0] == "-": |
print "Reading native crash info from stdin" |
f = sys.stdin |