Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with upstream #11

Merged
merged 36 commits into from
Oct 2, 2023
Merged

Sync with upstream #11

merged 36 commits into from
Oct 2, 2023

Conversation

JordanL8
Copy link

@JordanL8 JordanL8 commented Oct 2, 2023

No description provided.

aybe and others added 30 commits August 29, 2023 13:01
* Fix incorrect build instructions for Windows

* Add link to Visual Studio installer

* Refine building instructions for VS2019+

(cherry picked from commit c4a24b0)
* Minor code refactoring for re-use.

* Add Class.FindVariable helper method.

* Upgrade to .NET 6.

(cherry picked from commit db7949b)
* Minor code refactorings.

* Fix debug assert issue with vtable methods.

* Add support for WebAssembly C++ ABI to parser and AST converter.

(cherry picked from commit 9b06e7b)
* Code cleanups.

* Run GetterSetterToPropertyPass for more generators.

* Fixed compile warning when compiling parser bindings.

* Cleanup driver code.

* Remove dead 32-bit code.

* Reduce verbosity when Options.Quiet is set.

* Remove test compile-time warnings.

* Move .NET tests to tests/dotnet.

* Remove unused AST viewer code and premake-qt submodule.

* Move tests2/ contents to tests/.

(cherry picked from commit 4417dd9)
(cherry picked from commit 84b7276)
This is to workaround MSBuild CMake step from LLVM build in Windows
picking this up.

(cherry picked from commit 25e2c7c)
…dLogicalOriginalName (mono#1740)

Fixed properties getters of QualifiedOriginalName, QualifiedLogicalOriginalName and methods GetQualifiedName(),  GatherNamespaces.

(cherry picked from commit 9923d79)
Wrap default parameter expressions in parentheses to ensure whole expressions are casted instead of only the first operand.

(cherry picked from commit 169f868)
Remove Gitter since the link is 404 and we have not been using it anyway.

(cherry picked from commit 160efb4)
* CSharpExpressionPrinter: Recurse into operands

Recursively call `VisitExpression` on the LHS and RHS of a binary
operator expression. This fixes the generation for complex default
parameters involving things other than two enumeration members.

* CSharpSources: Use `const` when possible

Generate `const` instead of `static` members when possible.
This allows generated members to be used when compile-time constants are
required, such as default parameters.

(cherry picked from commit 1ce9cb7)
- Expression generation for `ConstructorReference` now also recursively
calls `VisitExpression` for the argument if only one argument is
detected. This allows correct overload generation for functions taking
a variable as the default parameter value.
- Default parameters of pointer-to-enumeration types are now correctly
generated similar to primitive types.

(cherry picked from commit add3aba)
* Generator: Customization for const char[]

Allow the user to choose whether `const char[]` should be marshalled as
`string` or a normal `char` array in C#.

A new option `MarshalConstCharArrayAsString` is added, and is `true`
by default.

This helps in situations where the original C++ API distinguishes
between C-strings and char arrays using the two different notations.

* CSharpMarshal: Fix unknown length array marshal

For unknown length arrays, also run a conversion loop if the primitive
type encountered needs conversion (e.g. `char` to `sbyte`).

* CSharpTypePrinter: Fix for boolean arrays

(cherry picked from commit 357efec)
Uses bare filename to pass to `dlopen` when the full path cannot
be detected. This helps on systems where library paths are not the
same as $PATH.

(cherry picked from commit 3978fb3)
Dereference pointers when generating getters for pointer variables.
Otherwise, the managed instance would point to the pointer itself
rather than the object at the native instance's address.

(cherry picked from commit ce3d04a)
)

* DllImport correct version of libdl

* Fix macOS
tritao and others added 6 commits October 2, 2023 09:41
…ono#1765)

* Fix missing Attribute dtor in GCC 11.

Parser bindings are expecting this, yet this was optimized out under GCC
11.

* Improve error handling for failed library parsing.

* Make the converted declaration cache more robust.

We were getting a failure due to duplicated original pointers. Make it
take the declaration kind into account as a key to the cache.

* Change ConsoleDriver.Run to return a failure bool.
* support clang 15.0.7

* Fix Premake archive logic to work with official releases.

* Try and upgrade CI to latest OS versions.

* Try and fix LLD link call in parser.

* CI fixes.

* Enable VS 2019 and VS 2022 for LLVM windows workflow.

* Update to a more recent LLVM revision.

* More build fixes.

* Use the system linker for linking symbols libraries outside Windows.

Builtin lld is giving some weird linking errors when linking with the
new LLVM version. We probably need to set some custom options. Using the
system linker should be a better idea anyway, more robust and future
proof.

---------

Co-authored-by: you74674 <[email protected]>
@JordanL8 JordanL8 merged commit 282505d into KytheraSpecific Oct 2, 2023
2 of 5 checks passed
@JordanL8 JordanL8 deleted the sync-with-upstream branch November 10, 2023 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants