[PATCH] D87051: scan-build-py: fix multiprocessing error
Lawrence D'Anna via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 5 11:10:49 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0c642828612d: scan-build-py: fix multiprocessing error (authored by lawrence_danna).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87051/new/
https://reviews.llvm.org/D87051
Files:
clang/tools/scan-build-py/bin/analyze-build
clang/tools/scan-build-py/bin/intercept-build
clang/tools/scan-build-py/bin/scan-build
Index: clang/tools/scan-build-py/bin/scan-build
===================================================================
--- clang/tools/scan-build-py/bin/scan-build
+++ clang/tools/scan-build-py/bin/scan-build
@@ -5,12 +5,13 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import multiprocessing
-multiprocessing.freeze_support()
-
import sys
import os.path
this_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(this_dir))
from libscanbuild.analyze import scan_build
-sys.exit(scan_build())
+
+if __name__ == '__main__':
+ multiprocessing.freeze_support()
+ sys.exit(scan_build())
Index: clang/tools/scan-build-py/bin/intercept-build
===================================================================
--- clang/tools/scan-build-py/bin/intercept-build
+++ clang/tools/scan-build-py/bin/intercept-build
@@ -5,12 +5,13 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import multiprocessing
-multiprocessing.freeze_support()
-
import sys
import os.path
this_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(this_dir))
from libscanbuild.intercept import intercept_build
-sys.exit(intercept_build())
+
+if __name__ == '__main__':
+ multiprocessing.freeze_support()
+ sys.exit(intercept_build())
Index: clang/tools/scan-build-py/bin/analyze-build
===================================================================
--- clang/tools/scan-build-py/bin/analyze-build
+++ clang/tools/scan-build-py/bin/analyze-build
@@ -5,12 +5,13 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import multiprocessing
-multiprocessing.freeze_support()
-
import sys
import os.path
this_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.dirname(this_dir))
from libscanbuild.analyze import analyze_build
-sys.exit(analyze_build())
+
+if __name__ == '__main__':
+ multiprocessing.freeze_support()
+ sys.exit(analyze_build())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87051.290101.patch
Type: text/x-patch
Size: 1970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200905/8d8731ff/attachment.bin>
More information about the cfe-commits
mailing list