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

vs2010backend: Initial MASM language support #14171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mochaaP
Copy link

@mochaaP mochaaP commented Jan 22, 2025

@mochaaP mochaaP requested a review from jpakkane as a code owner January 22, 2025 05:26
@mochaaP mochaaP force-pushed the vs-backend-masm branch 2 times, most recently from 4ff01c4 to 999e500 Compare January 22, 2025 06:53
@mochaaP
Copy link
Author

mochaaP commented Jan 22, 2025

cc @neheb you might have interest testing this :)

@@ -656,6 +657,13 @@ def create_basic_project(self, target_name, *,
# "The build tools for v142 (Platform Toolset = 'v142') cannot be found. ... please install v142 build tools."
# This is extremely unhelpful and misleading since the v14x build tools ARE installed.
ET.SubElement(root, 'Import', Project=r'$(VCTargetsPath)\Microsoft.Cpp.props')
ext_settings_grp = ET.SubElement(root, 'ImportGroup', Label='ExtensionSettings')
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it better to add this node only if masm_type?

Copy link
Author

Choose a reason for hiding this comment

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

I kept this in case we potentially need further BuildCustomizations, or make vs find where to properly add the element if you tick that build customization box in the GUI.

@@ -691,7 +699,8 @@ def create_basic_project(self, target_name, *,
if target_ext:
ET.SubElement(direlem, 'TargetExt').text = target_ext

ET.SubElement(direlem, 'EmbedManifest').text = 'false'
# Fix weird mt.exe error
Copy link
Member

Choose a reason for hiding this comment

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

What weird error? I think it would be better to remove this comment, and to fix the next line in a separate commit explaining what it is fixing.

Copy link
Author

Choose a reason for hiding this comment

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

mt.exe is trying to compile a non-existent .generated.manifest file and link it with the target if this element exists. This does not happen without masm props.

mesonbuild/backend/vs2010backend.py Outdated Show resolved Hide resolved
@@ -1782,6 +1817,9 @@ def path_normalize_add(path, lis):
ET.SubElement(inc_objs, 'Object', Include=s)

ET.SubElement(root, 'Import', Project=r'$(VCTargetsPath)\Microsoft.Cpp.targets')
ext_tgt_grp = ET.SubElement(root, 'ImportGroup', Label='ExtensionTargets')
Copy link
Member

Choose a reason for hiding this comment

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

I think that element could be created only if masm

Copy link
Author

Choose a reason for hiding this comment

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

same as above

@bruchar1 bruchar1 added the backend:visualstudio Visual Studio project backends label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:visualstudio Visual Studio project backends
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vs backend does not recognize masm files
2 participants