gyptest-ldflags.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. CHDIR = 'ldflags'
  14. test.run_gyp('subdirectory/test.gyp', chdir=CHDIR)
  15. test.build('subdirectory/test.gyp', test.ALL, chdir=CHDIR)
  16. test.pass_test()
  17. # These flags from `man ld` couldl show up in OTHER_LDFLAGS and need path
  18. # translation.
  19. #
  20. # Done:
  21. # -exported_symbols_list filename
  22. # -unexported_symbols_list file
  23. # -reexported_symbols_list file
  24. # -sectcreate segname sectname file
  25. #
  26. # Will be done on demand:
  27. # -weak_library path_to_library
  28. # -reexport_library path_to_library
  29. # -lazy_library path_to_library
  30. # -upward_library path_to_library
  31. # -syslibroot rootdir
  32. # -framework name[,suffix]
  33. # -weak_framework name[,suffix]
  34. # -reexport_framework name[,suffix]
  35. # -lazy_framework name[,suffix]
  36. # -upward_framework name[,suffix]
  37. # -force_load path_to_archive
  38. # -filelist file[,dirname]
  39. # -dtrace file
  40. # -order_file file # should use ORDER_FILE
  41. # -exported_symbols_order file
  42. # -bundle_loader executable # should use BUNDLE_LOADER
  43. # -alias_list filename
  44. # -seg_addr_table filename
  45. # -dylib_file install_name:file_name
  46. # -interposable_list filename
  47. # -object_path_lto filename
  48. #
  49. #
  50. # obsolete:
  51. # -sectorder segname sectname orderfile
  52. # -seg_addr_table_filename path
  53. #
  54. #
  55. # ??:
  56. # -map map_file_path
  57. # -sub_library library_name
  58. # -sub_umbrella framework_name