Skip to content

Commit 3e3fe3f

Browse files
committed
Merge pull request #2960 from ddunbar/freebsd-toolchain-crash
[swift_build_support] Fix crash in FreeBSD toolchain.
2 parents 90b0574 + ee4a843 commit 3e3fe3f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

utils/swift_build_support/swift_build_support/toolchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def __init__(self):
147147
super(FreeBSD, self).__init__(suffixes)
148148

149149
@cache_util.reify
150-
def _release_date():
150+
def _release_date(self):
151151
"""Return the release date for FreeBSD operating system on this host.
152152
If the release date cannot be ascertained, return None.
153153
"""

utils/swift_build_support/tests/test_toolchain.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import os
1313
import unittest
1414

15+
from swift_build_support import toolchain
1516
from swift_build_support.toolchain import host_toolchain
1617

1718

@@ -110,6 +111,14 @@ def test_tools_llvm_suffix(self):
110111
if profdata_suffix is not None:
111112
self.assertEqual(cc_suffix, profdata_suffix)
112113

114+
def test_toolchain_instances(self):
115+
# Check that we can instantiate every toolchain, even if it isn't the
116+
# current patform.
117+
toolchain.MacOSX()
118+
toolchain.Linux()
119+
toolchain.FreeBSD()
120+
toolchain.Cygwin()
121+
113122

114123
if __name__ == '__main__':
115124
unittest.main()

0 commit comments

Comments
 (0)