icu4c: no cxxstd flag option on Windows (#48510)

* ICU4C: Don't reference a spec variant on a platform on which it's not defined

* icu4c: no cxx flag on Windows
This commit is contained in:
John W. Parent 2025-02-06 20:55:57 -05:00 committed by GitHub
parent 64d53037db
commit f790ce0f72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,7 +72,7 @@ def url_for_version(self, version):
return url.format(version.dashed, version.underscored)
def flag_handler(self, name, flags):
if name == "cxxflags":
if name == "cxxflags" and not self.spec.platform == "windows":
# Control of the C++ Standard is via adding the required "-std"
# flag to CXXFLAGS in env
flags.append(getattr(self.compiler, f"cxx{self.spec.variants['cxxstd'].value}_flag"))
@ -125,7 +125,7 @@ def msbuild_args(self):
@property
def build_directory(self):
solution_path = pathlib.Path(self.pkg.stage.source_path)
if self.spec.satsifies("@:67"):
if self.spec.satisfies("@:67"):
solution_path = solution_path / "icu"
solution_path = solution_path / "source" / "allinone"
return str(solution_path)