Skip to content

Commit 3ac4267

Browse files
smessmerfacebook-github-bot
authored andcommitted
Force building with GCC 5 (#28098)
Summary: Pull Request resolved: #28098 Make sure that we're building with GCC 5 everywhere ghstack-source-id: 92013998 Test Plan: waitforsandcastle Differential Revision: D17953640 fbshipit-source-id: 26d978c60fc973c787383297d730b45d40fa300b
1 parent dc8785a commit 3ac4267

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

c10/util/C++17.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
#include <functional>
1212
#include <c10/macros/Macros.h>
1313

14+
15+
#if !defined(__clang__) && !defined(_MSC_VER) && defined(__GNUC__) && \
16+
__GNUC__ < 5
17+
#error "You're trying to build PyTorch with a too old version of GCC. We need GCC 5 or later."
18+
#endif
19+
1420
/*
1521
* This header adds some polyfills with C++14 and C++17 functionality
1622
*/

0 commit comments

Comments
 (0)