[llvm-branch-commits] [llvm] [lit] Add support for setting limits to unlimited (PR #165123)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Oct 27 09:08:42 PDT 2025
================
@@ -602,18 +602,28 @@ def executeBuiltinUlimit(cmd, shenv):
"""executeBuiltinUlimit - Change the current limits."""
if os.name != "posix":
raise InternalShellError(cmd, "'ulimit' not supported on this system")
+ # Import resource here after we confirm we are on a POSIX system as the
+ # module does not exist on Windows.
+ import resource
----------------
ilovepi wrote:
I could go either way on this import here. on one hand I like that its conditional, since ulimit is rare. on the other hand, I'd generally prefer the imports be together at the top of the file.
https://github.com/llvm/llvm-project/pull/165123
More information about the llvm-branch-commits
mailing list