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

Reduce Runtime's dependence to LLVM #3071

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

chentong319
Copy link
Collaborator

@chentong319 chentong319 commented Feb 9, 2025

  1. Replace the llvm::system with std::filesystem
  2. replace llvm::StringRef.compareCaseInsentive with implementation directly with std::string.
  3. Keep the llvm StandLibrary only for windows.

As a result, the code previous under PYRUNTIME_LIGHT for src/Runtime becomes the default code now.

Now the only source code difference is the float16 support in src/Runtime/python. There are too much code to copy from llvm. Low priority.

#include "llvm/ADT/SmallString.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Path.h"
#else
#include <algorithm>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor: please add // Please no references to LLVM in the else path just as a reminder that we don't reintroduce dependences on LLVM.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Those llvm includes are removed because they are replaced with STLs of C++.

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

Successfully merging this pull request may close these issues.

2 participants