OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright (c) 2015 Google Inc. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 """ |
| 8 Verifies duplicate ldflags are not removed. |
| 9 """ |
| 10 |
| 11 import sys |
| 12 |
| 13 def CheckContainsFlags(args, substring): |
| 14 if args.find(substring) is -1: |
| 15 print 'ERROR: Linker arguments "%s" are missing in "%s"' % (substring, args) |
| 16 return False; |
| 17 return True; |
| 18 |
| 19 if __name__ == '__main__': |
| 20 args = " ".join(sys.argv) |
| 21 print "args = " +args |
| 22 if not CheckContainsFlags(args, 'lib1.a -Wl,--no-whole-archive') \ |
| 23 or not CheckContainsFlags(args, 'lib2.a -Wl,--no-whole-archive'): |
| 24 sys.exit(1); |
| 25 sys.exit(0) |
OLD | NEW |