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

gdc: error: unrecognized command-line option ‘-preview=dip1000’; did you mean ‘-fpreview=dip1000’? #2937

Open
mw66 opened this issue Jun 21, 2024 · 1 comment

Comments

@mw66
Copy link

mw66 commented Jun 21, 2024

System information

atilaneves/unit-threaded#314

Bug Description

Hi, I'm trying to build unit-threaded/2.2.0, using gdc:

$ gdc --version
gdc (GCC) 14.1.0

got an error:

gdc: error: unrecognized command-line option ‘-preview=dip1000’; did you mean ‘-fpreview=dip1000’?

found this:

https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gdc.pdf

looks like GDC's flag called fpreview instead of preview.

Expected Behavior

I think instead of asking the programmer to specify:

dflags-dmd {...}
dflags-ldc {...}
dflags-gdc {...}

separately, dub can do such conversion to make life easier.

@mw66
Copy link
Author

mw66 commented Jun 21, 2024

atilaneves/dpp#348

This is a related issue: in many dub packages from https://code.dlang.org/

the project dub.json it has flag "-dip25", however gdc does not recognize this:

gdc -dip25 ...

d21: warning: unrecognized gcc debugging option: i
d21: warning: unrecognized gcc debugging option: 2
d21: warning: unrecognized gcc debugging option: 5

Instead of asking each library owner update their dub.json file, I think it's better dub can translate this flag to gdc to -fpreview=dip25, so all the existing libraries can be build without change.

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

No branches or pull requests

1 participant