Skip to content

Commit fcaae57

Browse files
committed
Hopefully fix windows builds by toggling crlf
Update to dArt 3.8.2
1 parent 48c8417 commit fcaae57

File tree

5 files changed

+32
-21
lines changed

5 files changed

+32
-21
lines changed

.dart_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This file contains the current Dart version we build against
2-
3.8.1
2+
3.8.2

.vscode/launch.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7-
{
8-
9-
"name": "(WIN)RealTime Sample",
10-
"type": "cppvsdbg",
11-
"request": "launch",
12-
//"preLaunchTask": "buildSimpelTest",
13-
"program": "${workspaceFolder}/build/Debug/realtime_example.exe",
14-
"args": [],
15-
"stopAtEntry": false,
16-
"cwd": "${fileDirname}",
17-
"environment": [],
18-
"console": "externalTerminal"
19-
}
7+
208
]
219
}

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
},
88
"dart.analysisExcludedFolders": [
99
"dart-sdk"
10-
]
10+
],
11+
"files.associations": {
12+
"xiosbase": "cpp"
13+
}
1114
}

dart_sdk.patch

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ index fb3ca5fc537..9760a092244 100644
1414
import("runtime/runtime_args.gni")
1515
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
1616
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
17-
index b77bab8676c..b9739fab43a 100644
17+
index b77bab8676c..70ecff6ed17 100644
1818
--- a/build/config/compiler/BUILD.gn
1919
+++ b/build/config/compiler/BUILD.gn
2020
@@ -254,8 +254,9 @@ config("compiler") {
@@ -23,21 +23,22 @@ index b77bab8676c..b9739fab43a 100644
2323
} else {
2424
- cflags += [ "-fPIE" ]
2525
- ldflags += [ "-fPIE" ]
26-
+ # dart_shared_library overriden - we need -fPIC to properly build
27-
+ cflags += [ "-fPIC" ]
28-
+ ldflags += [ "-fPIC" ]
26+
+ # dart_shared_library overriden - we need -fPIC to properly build
27+
+ cflags += [ "-fPIC" ]
28+
+ ldflags += [ "-fPIC" ]
2929
}
3030
}
3131

3232
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
33-
index 57d7006036d..fd677355210 100644
33+
index 57d7006036d..0eeeff15c8f 100644
3434
--- a/runtime/bin/BUILD.gn
3535
+++ b/runtime/bin/BUILD.gn
36-
@@ -1224,3 +1224,47 @@ static_library("dart_embedder_runtime_jit") {
36+
@@ -1224,3 +1224,48 @@ static_library("dart_embedder_runtime_jit") {
3737
output_name = "dart_embedder_runtime_jit"
3838
deps = [ ":dart_embedder_runtime_jit_set" ]
3939
}
4040
+
41+
+
4142
+static_library("libdart") {
4243
+ deps = [
4344
+ ":standalone_dart_io",

scripts/build_helpers/bin/build_dart.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ Future<bool> _fetchOrUpdateDartSdk() async {
102102
logger.i('dart-sdk does not exist. Doing full fetch');
103103

104104
await Directory('dart-sdk').create();
105+
logger.i('Temp changing global crlf');
106+
final gitGlobalCrlfOffProcess = await Process.start(
107+
'git',
108+
['config', '--global', 'core.autocrlf', 'false'],
109+
runInShell: true,
110+
);
111+
var gitGlobalCrlfOffResult =
112+
await waitForProcessFinish(gitGlobalCrlfOffProcess);
113+
if (gitGlobalCrlfOffResult != 0) return false;
105114

106115
final fetchResult = await inDir('dart-sdk', () async {
107116
final fetchProcess =
@@ -138,6 +147,16 @@ Future<bool> _fetchOrUpdateDartSdk() async {
138147
var syncResult = await waitForProcessFinish(syncProcess);
139148
if (syncResult != 0) return syncResult;
140149

150+
logger.i('Reverting changing global crlf');
151+
final gitGlobalCrlfOnProcess = await Process.start(
152+
'git',
153+
['config', '--global', 'core.autocrlf', 'true'],
154+
runInShell: true,
155+
);
156+
var gitGlobalCrlfOnResult =
157+
await waitForProcessFinish(gitGlobalCrlfOnProcess);
158+
if (gitGlobalCrlfOnResult != 0) return false;
159+
141160
return 0;
142161
});
143162

0 commit comments

Comments
 (0)