Skip to content

[native_toolchain_c] Support Clang on Windows#1893

Merged
dcharkes merged 3 commits intomainfrom
windows-clang
Jan 17, 2025
Merged

[native_toolchain_c] Support Clang on Windows#1893
dcharkes merged 3 commits intomainfrom
windows-clang

Conversation

@dcharkes
Copy link
Collaborator

@dcharkes dcharkes commented Jan 14, 2025

Bug: #1892

It seems that both Clang via https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.0, and Clang via the MSVC installer come with batteries included and link to the windows headers (added an use of wprintf).

(The Clang-for-Windows on the Dart CI does not come with batteries included: see #1892 (comment).)

Does not add support for arm64 (neither msvc nor clang): #170

@github-actions
Copy link

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
License Headers ✔️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/jni/lib/src/third_party/generated_bindings.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

@coveralls
Copy link

coveralls commented Jan 14, 2025

Coverage Status

coverage: 87.409% (+0.009%) from 87.4%
when pulling 8b2a8a7 on windows-clang
into f179ec2 on main.

selectOptimizationLevel =
(selectOptimizationLevel + 1) % optimizationLevels.length;
final buildMode = BuildMode.values[selectBuildMode];
selectBuildMode = (selectBuildMode + 1) % BuildMode.values.length;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this some kind of fuzzy testing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, it would be fuzz testing if we would randomize the params and run it nightly. Now it's a poor mans combination of trying to cover some combination of params 😄

@dcharkes dcharkes merged commit 434db67 into main Jan 17, 2025
37 checks passed
@dcharkes dcharkes deleted the windows-clang branch January 17, 2025 10:46
@dcharkes
Copy link
Collaborator Author

Thanks @mkustermann and @mosuem ! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants