Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: components/cronet/tools/check_no_neon.py

Issue 2341903002: Building cronet targets multiple times now reports "no work to do" (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/cronet/tools/check_no_neon.py
diff --git a/components/cronet/tools/check_no_neon.py b/components/cronet/tools/check_no_neon.py
index f9cdff93c1581dcc93ab5ae00ab9b4fcfcf1f665..344ba691b9a4cc677488297c73f17cf2baaba7c1 100755
--- a/components/cronet/tools/check_no_neon.py
+++ b/components/cronet/tools/check_no_neon.py
@@ -9,16 +9,28 @@ import argparse
import os
import sys
+REPOSITORY_ROOT = os.path.abspath(os.path.join(
+ os.path.dirname(__file__), '..', '..', '..'))
+
+sys.path.append(os.path.join(REPOSITORY_ROOT, 'build/android/gyp/util'))
+import build_utils
+
def main(args):
parser = argparse.ArgumentParser(
description='Check modules do not contain ARM Neon instructions.')
parser.add_argument('objdump', metavar='path/to/ARM/objdump')
parser.add_argument('objects', metavar='files/to/check/*.o')
+ parser.add_argument('--stamp', help='Path to touch on success.')
opts = parser.parse_args(args)
- return os.system(opts.objdump + ' -d --no-show-raw-insn ' +
+ ret = os.system(opts.objdump + ' -d --no-show-raw-insn ' +
opts.objects + ' | grep -q "vld[1-9]\\|vst[1-9]"')
+ # Non-zero exit code means no neon.
+ if ret and opts.stamp:
+ build_utils.Touch(opts.stamp)
+ return ret
+
if __name__ == '__main__':
sys.exit(0 if main(sys.argv[1:]) != 0 else -1)

Powered by Google App Engine
This is Rietveld 408576698