Browse Source

Pass exact versions to -Wl,-platform_version

This is to suppress
```
ld64.lld: warning: util/libyutil.a(all_memory.cpp.o) has version 13.0.0, which is newer than target minimum of 11.0
ld64.lld: warning: util/libyutil.a(all_random.cpp.o) has version 13.0.0, which is newer than target minimum of 11.0
```

when linking ios executable by the means of `ld64.lld`
1afeea0bb7f1e24f2791beaeb18b1a1bf67e5776
thegeorg 10 months ago
parent
commit
bf5f7416dc
1 changed files with 3 additions and 3 deletions
  1. 3 3
      build/ymake_conf.py

+ 3 - 3
build/ymake_conf.py

@@ -1732,9 +1732,9 @@ class LD(Linker):
 
         self.ld_sdk = select(default=None, selectors=[
             # -platform_version <platform> <min_version> <sdk_version>
-            (target.is_macos, '-Wl,-platform_version,macos,11.0,11.0'),
-            (not target.is_iossim and target.is_ios, '-Wl,-platform_version,ios,11.0,13.1'),
-            (target.is_iossim, '-Wl,-platform_version,ios-simulator,14.0,14.5'),
+            (target.is_macos, '-Wl,-platform_version,macos,{MACOS_VERSION_MIN},11.0'.format(MACOS_VERSION_MIN=MACOS_VERSION_MIN)),
+            (not target.is_iossim and target.is_ios, '-Wl,-platform_version,ios,{IOS_VERSION_MIN},13.1'.format(IOS_VERSION_MIN=IOS_VERSION_MIN)),
+            (target.is_iossim, '-Wl,-platform_version,ios-simulator,{IOS_VERSION_MIN},14.5'.format(IOS_VERSION_MIN=IOS_VERSION_MIN)),
         ])
 
         if self.build.profiler_type == Profiler.GProf: