|
12 | 12 | resExt = ".res"
|
13 | 13 | resiExt = ".resi"
|
14 | 14 | 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. |
21 | 21 | platformInNodeJS = "linux"
|
22 | 22 | if platformSystem == "Darwin":
|
23 | 23 | platformInNodeJS = "darwin"
|
24 | 24 | elif platformSystem == "Windows":
|
25 | 25 | platformInNodeJS = "win32"
|
| 26 | +elif platformSystem == "FreeBSD": |
| 27 | + platformInNodeJS = "freebsd" |
26 | 28 |
|
27 | 29 | bscPartialPath = os.path.join("node_modules", "bs-platform", platformInNodeJS, "bsc.exe")
|
28 | 30 |
|
|
0 commit comments