Skip to content

Commit 285d04d

Browse files
committedAug 24, 2020
FreeBSD support
1 parent e90e590 commit 285d04d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎format.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@
1212
resExt = ".res"
1313
resiExt = ".resi"
1414
platformSystem = platform.system()
15-
# rescript currently supports 3 platforms: darwin, linux, win32. these also
16-
# happen to be folder names for the location of the bsc binary. We're in
17-
# python, so we're gonna translate python's output of system to nodejs'
18-
# Why don't we just use the binary in node_modules/.bin/bsc? Because that
19-
# one's a nodejs wrapper, which has a startup cost. It makes it so that every
20-
# time we call it for e.g. formatting, the result janks a little.
15+
# rescript currently supports 4 platforms: darwin, linux, win32, freebsd.
16+
# These also happen to be folder names for the location of the bsc binary.
17+
# We're in python, so we're gonna translate python's output of system to
18+
# nodejs'. Why don't we just use the binary in node_modules/.bin/bsc? Because
19+
# that one's a nodejs wrapper, which has a startup cost. It makes it so that
20+
# every time we call it for e.g. formatting, the result janks a little.
2121
platformInNodeJS = "linux"
2222
if platformSystem == "Darwin":
2323
platformInNodeJS = "darwin"
2424
elif platformSystem == "Windows":
2525
platformInNodeJS = "win32"
26+
elif platformSystem == "FreeBSD":
27+
platformInNodeJS = "freebsd"
2628

2729
bscPartialPath = os.path.join("node_modules", "bs-platform", platformInNodeJS, "bsc.exe")
2830

0 commit comments

Comments
 (0)