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

fix Issue 22568 - -target option does nothing in compilation #13484

Closed
wants to merge 2 commits into from

Conversation

WalterBright
Copy link
Member

At least it can now generate a Windows 64 object file.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
22568 major -target option does nothing in compilation

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#13484"

@WalterBright
Copy link
Member Author

****** FAIL debug64 std.experimental.allocator
core.exception.AssertError@std/experimental/allocator/package.d(3738): Assertion failure

This randomly shows up on diverse PRs. Sigh.

@WalterBright
Copy link
Member Author

@WalterBright
Copy link
Member Author

It appears to be impossible to get the autotester to not add -fPIC.

test/compilable/traits.d Outdated Show resolved Hide resolved
@WalterBright
Copy link
Member Author

Filed this one on the test runner for blocking attempts to test Windows cross-compilation:

https://issues.dlang.org/show_bug.cgi?id=22642

@WalterBright
Copy link
Member Author

Parallels isolation failed: failed to create VM cloned from "monterey-xcode-13.2": Parallels VM operation failed: failed to clone VM "cirrus-b70e6248-edd9-4834-82ee-e84ba2dce3b9": Parallels command returned non-zero exit code: "Failed to clone the VM: Unable to perform the operation because "monterey-xcode-13.2" is in the intermediate state. Unpacking "/Users/administrator/Parallels/monterey-xcode-13.2.pvmi/config.pvsp" has been started but not finished yet. Please finish unpacking."

@WalterBright
Copy link
Member Author

https://issues.dlang.org/show_bug.cgi?id=22643

macOS 12.x x64, DMD (latest)

Can someone who knows how these tests work please address the heisenbugs?

@maxhaton
Copy link
Member

maxhaton commented Jan 1, 2022

https://issues.dlang.org/show_bug.cgi?id=22643

macOS 12.x x64, DMD (latest)

Can someone who knows how these tests work please address the heisenbugs?

As far as I can tell this one is the CI provider fucking it up

I've just rerun it. if you sign into the ci provider you should have a button to rerun it also, you just need to sign in with your github account so it knows you have rights to the repository.

@WalterBright
Copy link
Member Author

I've just rerun it.

Can we please find another way? I push the rerun button all the time, nothing happens. These heisenbugs now seem to prevent passing 75% of the time. This is just a terrible waste of time.

@WalterBright
Copy link
Member Author

And ANOTHER one pops up:

Run (macOS-10.15, clang-13.0.0)

4s
Run dlang-community/setup-dlang@v1
Error: unrecognized DMD version: 
    at dmd (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/dist/index.js:1:127324)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Object.compiler (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/dist/index.js:1:126504)
    at async run (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/dist/index.js:1:133006)
Error: unrecognized DMD version: 

@12345swordy
Copy link
Contributor

All green here walter.

* with no arguments will prevent it.
*/
/* EQUIRED_ARGSx -m64 -target=x64-windows-msvc -mscrtlib=whatever.lib
* ERMUTE_ARGSx
Copy link
Member

Choose a reason for hiding this comment

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

Typo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope. The test runner has a buggy parser in it, and will recognize PERMUTE_ARGS if it is embedded in another identifier.

Copy link
Member

Choose a reason for hiding this comment

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

That should be addressed by #13478.

@MoonlightSentinel
Copy link
Contributor

Filed this one on the test runner for blocking attempts to test Windows cross-compilation:

This is can easily be fixed in the test runner. But note that this will also be a pain for actual linux users which have -fPIC enabled by default in their dmd.conf.

@WalterBright
Copy link
Member Author

this will also be a pain for actual linux users which have -fPIC enabled by default in their dmd.conf.

It will indeed. Users will need to use a different dmd.conf for cross compiling.

@PetarKirov
Copy link
Member

Users will need to use a different dmd.conf for cross compiling.

I think the way LDC's configuration (based on libconfig) handles this is better: It allows multiple sections (e.g. one per target triple, or one section covering a family of triples idefied by a glob-like syntax (IIRC)), each of which can specify its own set of compiler arguments.

Perhaps DMD should adopt LDC's configuration format? One advantage for end users would be that they can put not only configuration for each target triple that they need in a single file, but they can also have configuration for both LDC and DMD in one place (perhaps GDC too, but I don't know if that's compatible with the GCC way of doing things). Also a user of the language would need to learn and maintain one configuration file instead of 2 (or more).

That said, users that care about cross-compilation are likely to handle this on the build-system level and they can simply pass -conf= to indicate that no config file should be used, so they can specify everything explicitly (that would otherwise be inside dmd.conf.

@RazvanN7
Copy link
Contributor

RazvanN7 commented Mar 8, 2022

I think we can close this now since we the -os switch.

@RazvanN7 RazvanN7 closed this Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants