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

[clang] --entry command line option is broken #68355

Open
s-barannikov opened this issue Oct 5, 2023 · 7 comments · May be fixed by #69114
Open

[clang] --entry command line option is broken #68355

s-barannikov opened this issue Oct 5, 2023 · 7 comments · May be fixed by #69114
Assignees
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' good first issue https://github.com/llvm/llvm-project/contribute

Comments

@s-barannikov
Copy link
Contributor

Optoion '--entry' ('--entry=') should be forwarded to linker the same way as its aliasee '-e' is forwarded. Currently, it complains about unsupported option.

clang test.c --entry=my_start
clang: error: unsupported option '--entry=my_start'

Apparently, the option is declared as a flag, i.e. clang accepts this, but linker non-surprisingly fails:

clang test.c --entry
/usr/bin/ld: warning: cannot find entry symbol --library=gcc; defaulting to 0000000000001040

Reference:
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#index-e

@s-barannikov s-barannikov added good first issue https://github.com/llvm/llvm-project/contribute clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Oct 5, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Oct 5, 2023

@llvm/issue-subscribers-clang-driver

Optoion '--entry' ('--entry=') should be forwarded to linker the same way as its aliasee '-e' is forwarded. Currently, it complains about unsupported option. ``` clang test.c --entry=my_start clang: error: unsupported option '--entry=my_start' ```

Apparently, the option is declared as a flag, i.e. clang accepts this, but linker non-surprisingly fails:

clang test.c --entry
/usr/bin/ld: warning: cannot find entry symbol --library=gcc; defaulting to 0000000000001040

Reference:
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#index-e

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 5, 2023

@llvm/issue-subscribers-good-first-issue

Optoion '--entry' ('--entry=') should be forwarded to linker the same way as its aliasee '-e' is forwarded. Currently, it complains about unsupported option. ``` clang test.c --entry=my_start clang: error: unsupported option '--entry=my_start' ```

Apparently, the option is declared as a flag, i.e. clang accepts this, but linker non-surprisingly fails:

clang test.c --entry
/usr/bin/ld: warning: cannot find entry symbol --library=gcc; defaulting to 0000000000001040

Reference:
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#index-e

@Dhruval7878
Copy link

Hey can you assign me this ?? I guess i can solve it

@s-barannikov
Copy link
Contributor Author

Sure, although I think you can to do it yourself.

@Dhruval7878
Copy link

Sure, although I think you can to do it yourself.

Hey , if possible can we connect on discord or somethin ?

@JohnyTheCarrot
Copy link

Hey, I think I've got this working. Will PR soon.

@Dhruval7878 Dhruval7878 removed their assignment Oct 15, 2023
@JohnyTheCarrot
Copy link

Can't seem to assign myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' good first issue https://github.com/llvm/llvm-project/contribute
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants