chen3feng / blade-build

Blade is a powerful build system from Tencent, supports many mainstream programming languages, such as C/C++, java, scala, python, protobuf...
Other
2.05k stars 500 forks source link

error log is hidden when cu_library fail #998

Open noanswer opened 1 year ago

noanswer commented 1 year ago

Is your feature request related to a problem? Please describe. When the user's cuda code has something wrong and can not be compiled correctly, the target failed but without error debug information. It is becuase that the error info is after the header list of the gcc -H and awk hide all the information after "Multiple include guards may be useful for:"

Describe the solution you'd like optimize the awk bash code awk '/Multiple include guards may be useful for:/ {stop=1} /^\.+ [^\/]/ { print $0} !/^\.+ / && !stop {print $0 > "/dev/stderr"}' > build64_release/some_path/some_obj.objs/some_obj.cu.o.H

Let the awk find the ending of the Multiple include guards log and print the remaining log of other debug info.

Describe alternatives you've considered Empty

Additional context For gcc, some information like cc1plus: all warnings being treated as errors is also hidden, which is not crucial to users.