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

Make executable name generated by CMake backward compatible with the old Makefile #737

Open
Barabas5532 opened this issue Feb 13, 2025 · 2 comments

Comments

@Barabas5532
Copy link

The new cmake build system #551 #647 generates an executable named riscv_sim_rv32d. Could you make it generate the old name so it is easier for users to upgrade?

It could be a cmake option that installs a symlink with the old name so that people already updated don't get broken again.

There are many projects and tutorials using the old name already.

@Timmmm
Copy link
Collaborator

Timmmm commented Feb 13, 2025

Hmm most of those use c_emulator/riscv_sim_RVxx though, which wouldn't work anyway since the executables are generated in a build directory now.

The other wrinkle is that the name is going to (hopefully) change again when we build a single emulator that can do all xlen & flen combinations.

I kind of think enabling a CMake option is just as much work as editing the name... I guess we could put a symlink in the repo from c_emulator/riscv_sim_RV32 to ../build/c_emulator/riscv_sim_rv32d? Might be confusing that it starts off broken though...

@Barabas5532
Copy link
Author

I don't mind the change in the location of the built executable from c_emulator to the build folder with cmake. The location of the executable can be updated in the build script when switching to cmake.

Actually I used cmake to install, which abstracts the built executable location completely: Barabas5532/crush@9888719#diff-f34da55ca08f1a30591d8b0b3e885bcc678537b2a9a4aadea4f190806b374ddcL38. If I didn't do this, I could have updated the mv command to rename the executable for compatibility as well.

I wouldn't hardcode the symlink to build. Users can specify any build folder name for cmake. It could be fine if the build guide explains to use exactly "build" as the folder name.

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

2 participants