[Lldb-commits] [lldb] [lldb] Introduce the @require decorators (PR #212632)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 29 03:29:04 PDT 2026


charles-zablit wrote:

> I think this will add some important clarity, and will allow us to generate accurate statistics about the support level of the various platforms.
> 
> How do these decorators stack?
> 
> I.e.: if I have `@requireDarwin @requireWindows` does it run (1) never, or (2) on Darwin and on Windows?
> 
> What happens if I mark a test up as `@requireNonDarwin @requireWindows`, does it run on Linux?

This will never run:

```py3
@requireDarwin
@requireWindows
def test():
    ...
```

This will not run on Linux, because `@requireWindows` is not satisfied.
```py3
@requireNotDarwin
@requireWindows
def test():
    ...
```

For "require Darwin or Windows", you need:
```py3
@requirePlatform(["darwin", "windows"])
def test():
    ...
```

For "require Darwin on ARM64 or Windows on ARM64", you need:
```py3
@requireARM64
@requirePlatform(["darwin", "windows"])
def test():
    ...
```


https://github.com/llvm/llvm-project/pull/212632


More information about the lldb-commits mailing list