fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1--- swift/utils/build-script-impl 2017-01-23 12:47:20.401326309 -0600
2+++ swift-pax/utils/build-script-impl 2017-01-23 13:24:10.339366996 -0600
3@@ -1823,6 +1823,17 @@ function set_lldb_xcodebuild_options() {
4 fi
5 }
6
7+## XXX: Taken from nixpkgs /pkgs/stdenv/generic/setup.sh
8+isELF() {
9+ local fn="$1"
10+ local fd
11+ local magic
12+ exec {fd}< "$fn"
13+ read -n 4 -u $fd magic
14+ exec {fd}<&-
15+ if [[ "$magic" =~ ELF ]]; then return 0; else return 1; fi
16+}
17+
18 #
19 # Configure and build each product
20 #
21@@ -2624,6 +2634,12 @@ for host in "${ALL_HOSTS[@]}"; do
22 fi
23
24 call "${CMAKE_BUILD[@]}" "${build_dir}" $(cmake_config_opt ${product}) -- "${BUILD_ARGS[@]}" ${build_targets[@]}
25+
26+ while IFS= read -r -d $'\0' i; do
27+ if ! isELF "$i"; then continue; fi
28+ echo "setting pax flags on $i"
29+ paxctl -czexm "$i" || true
30+ done < <(find "${build_dir}" -executable -type f -wholename "*/bin/*" -print0)
31 fi
32 done
33 done