diff options
author | pg <pg@yandex-team.com> | 2023-09-13 16:24:18 +0300 |
---|---|---|
committer | pg <pg@yandex-team.com> | 2023-09-13 18:39:22 +0300 |
commit | 3b95804df115d71b5940e203bcae64c97733188b (patch) | |
tree | aa09f37547566bc9844f9d1201aa59db09b85d58 | |
parent | f0306787cc9780b9cb5b2cde2240ba27ff45606a (diff) | |
download | ydb-3b95804df115d71b5940e203bcae64c97733188b.tar.gz |
-rw-r--r-- | build/platform/lld/ya.make | 2 | ||||
-rw-r--r-- | build/scripts/link_fat_obj.py | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/build/platform/lld/ya.make b/build/platform/lld/ya.make index be2469b977..ddf3a9fb36 100644 --- a/build/platform/lld/ya.make +++ b/build/platform/lld/ya.make @@ -55,7 +55,7 @@ ELSEIF (OS_DARWIN OR OS_IOS) -fuse-ld=${LLD_ROOT_RESOURCE_GLOBAL}/ld64.lld ) ELSEIF (XCODE) - LDFLAGS(-Ya,xcode) + LDFLAGS(-DYA_XCODE) ELSE() LDFLAGS( -fuse-ld=lld diff --git a/build/scripts/link_fat_obj.py b/build/scripts/link_fat_obj.py index 8862a00106..19f2982a42 100644 --- a/build/scripts/link_fat_obj.py +++ b/build/scripts/link_fat_obj.py @@ -9,6 +9,15 @@ from process_whole_archive_option import ProcessWholeArchiveOption YA_ARG_PREFIX = '-Ya,' +def flt_args(): + for a in sys.argv[1:]: + if a.startswith('-l'): + # skip -lxxx args + pass + else: + yield a + + def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--obj') @@ -21,7 +30,7 @@ def get_args(): groups = {} args_list = groups.setdefault('default', []) - for arg in pcf.iter_args(sys.argv[1:]): + for arg in pcf.iter_args(list(flt_args())): if arg == '--with-own-obj': groups['default'].append(arg) elif arg == '--globals-lib': @@ -67,7 +76,7 @@ def main(): linker = groups['linker'] archiver = groups['archiver'] - if 'Ya,xcode' in str(sys.argv): + if 'YA_XCODE' in str(sys.argv): no_pie = '-Wl,-no_pie' else: no_pie = '-Wl,-no-pie' |