gyptest-ldflags.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/usr/bin/env python
  2. # Copyright (c) 2012 Google Inc. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. """
  6. Verifies that filenames passed to various linker flags are converted into
  7. build-directory relative paths correctly.
  8. """
  9. import TestGyp
  10. import sys
  11. if sys.platform == 'darwin':
  12. test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
  13. # The xcode-ninja generator handles gypfiles which are not at the
  14. # project root incorrectly.
  15. # cf. https://code.google.com/p/gyp/issues/detail?id=460
  16. if test.format == 'xcode-ninja':
  17. test.skip_test()
  18. CHDIR = 'ldflags'
  19. test.run_gyp('subdirectory/test.gyp', chdir=CHDIR)
  20. test.build('subdirectory/test.gyp', test.ALL, chdir=CHDIR)
  21. test.pass_test()
  22. # These flags from `man ld` couldl show up in OTHER_LDFLAGS and need path
  23. # translation.
  24. #
  25. # Done:
  26. # -exported_symbols_list filename
  27. # -unexported_symbols_list file
  28. # -reexported_symbols_list file
  29. # -sectcreate segname sectname file
  30. #
  31. # Will be done on demand:
  32. # -weak_library path_to_library
  33. # -reexport_library path_to_library
  34. # -lazy_library path_to_library
  35. # -upward_library path_to_library
  36. # -syslibroot rootdir
  37. # -framework name[,suffix]
  38. # -weak_framework name[,suffix]
  39. # -reexport_framework name[,suffix]
  40. # -lazy_framework name[,suffix]
  41. # -upward_framework name[,suffix]
  42. # -force_load path_to_archive
  43. # -filelist file[,dirname]
  44. # -dtrace file
  45. # -order_file file # should use ORDER_FILE
  46. # -exported_symbols_order file
  47. # -bundle_loader executable # should use BUNDLE_LOADER
  48. # -alias_list filename
  49. # -seg_addr_table filename
  50. # -dylib_file install_name:file_name
  51. # -interposable_list filename
  52. # -object_path_lto filename
  53. #
  54. #
  55. # obsolete:
  56. # -sectorder segname sectname orderfile
  57. # -seg_addr_table_filename path
  58. #
  59. #
  60. # ??:
  61. # -map map_file_path
  62. # -sub_library library_name
  63. # -sub_umbrella framework_name