xmake icon indicating copy to clipboard operation
xmake copied to clipboard

Cannot catch build errors when gcc/clang fails

Open waruqi opened this issue 3 years ago • 0 comments

Xmake Version

2.7.6

Operating System Version and Architecture

macOS

Describe Bug

When gcc/clang fails to compile, it is not caught by the try-catch of the build action, although it exits directly and reports a compilation error.

Therefore, we can't nicely hook the build error to do something customizable.

https://github.com/xmake-io/xmake/blob/775cc38c761e02fa3ff4825eabca344b98c75b78/xmake/actions/build/main.lua#L160-L170

It will exit directly here

https://github.com/xmake-io/xmake/blob/775cc38c761e02fa3ff4825eabca344b98c75b78/xmake/core/main.lua#L303-L307

Expected Behavior

Catch it.

Project Configuration

No response

Additional Information and Error Logs

No response

waruqi avatar Feb 21 '23 04:02 waruqi