From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- third_party/rust/libc/.cargo-checksum.json | 1 + third_party/rust/libc/.cargo-ok | 0 third_party/rust/libc/.gitignore | 3 + third_party/rust/libc/.travis.yml | 119 ++ third_party/rust/libc/Cargo.toml | 18 + third_party/rust/libc/LICENSE-APACHE | 201 +++ third_party/rust/libc/LICENSE-MIT | 25 + third_party/rust/libc/README.md | 135 ++ third_party/rust/libc/appveyor.yml | 21 + third_party/rust/libc/ci/README.md | 203 +++ .../ci/docker/aarch64-unknown-linux-gnu/Dockerfile | 7 + .../ci/docker/arm-linux-androideabi/Dockerfile | 4 + .../docker/arm-unknown-linux-gnueabihf/Dockerfile | 7 + .../ci/docker/i686-unknown-linux-gnu/Dockerfile | 5 + .../ci/docker/i686-unknown-linux-musl/Dockerfile | 13 + .../ci/docker/mips-unknown-linux-gnu/Dockerfile | 10 + .../ci/docker/mipsel-unknown-linux-musl/Dockerfile | 14 + .../ci/docker/powerpc-unknown-linux-gnu/Dockerfile | 10 + .../docker/powerpc64-unknown-linux-gnu/Dockerfile | 11 + .../ci/docker/x86_64-rumprun-netbsd/Dockerfile | 6 + .../ci/docker/x86_64-unknown-freebsd/Dockerfile | 13 + .../ci/docker/x86_64-unknown-linux-gnu/Dockerfile | 5 + .../ci/docker/x86_64-unknown-linux-musl/Dockerfile | 13 + .../ci/docker/x86_64-unknown-openbsd/Dockerfile | 7 + third_party/rust/libc/ci/dox.sh | 33 + third_party/rust/libc/ci/landing-page-footer.html | 3 + third_party/rust/libc/ci/landing-page-head.html | 7 + third_party/rust/libc/ci/run-docker.sh | 25 + third_party/rust/libc/ci/run-qemu.sh | 35 + third_party/rust/libc/ci/run.sh | 147 ++ third_party/rust/libc/ci/style.rs | 204 +++ third_party/rust/libc/src/dox.rs | 134 ++ third_party/rust/libc/src/lib.rs | 274 ++++ third_party/rust/libc/src/macros.rs | 108 ++ third_party/rust/libc/src/unix/bsd/apple/b32.rs | 19 + third_party/rust/libc/src/unix/bsd/apple/b64.rs | 19 + third_party/rust/libc/src/unix/bsd/apple/mod.rs | 1498 ++++++++++++++++++++ .../libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs | 301 ++++ .../libc/src/unix/bsd/freebsdlike/freebsd/mod.rs | 304 ++++ .../libc/src/unix/bsd/freebsdlike/freebsd/x86.rs | 31 + .../src/unix/bsd/freebsdlike/freebsd/x86_64.rs | 30 + .../rust/libc/src/unix/bsd/freebsdlike/mod.rs | 877 ++++++++++++ third_party/rust/libc/src/unix/bsd/mod.rs | 366 +++++ .../rust/libc/src/unix/bsd/openbsdlike/bitrig.rs | 490 +++++++ .../rust/libc/src/unix/bsd/openbsdlike/mod.rs | 547 +++++++ .../rust/libc/src/unix/bsd/openbsdlike/netbsd.rs | 614 ++++++++ .../rust/libc/src/unix/bsd/openbsdlike/openbsd.rs | 462 ++++++ third_party/rust/libc/src/unix/mod.rs | 851 +++++++++++ .../rust/libc/src/unix/notbsd/android/b32.rs | 151 ++ .../rust/libc/src/unix/notbsd/android/b64.rs | 161 +++ .../rust/libc/src/unix/notbsd/android/mod.rs | 718 ++++++++++ .../rust/libc/src/unix/notbsd/linux/mips.rs | 627 ++++++++ .../rust/libc/src/unix/notbsd/linux/mips64.rs | 220 +++ third_party/rust/libc/src/unix/notbsd/linux/mod.rs | 689 +++++++++ .../libc/src/unix/notbsd/linux/musl/b32/arm.rs | 321 +++++ .../libc/src/unix/notbsd/linux/musl/b32/asmjs.rs | 320 +++++ .../libc/src/unix/notbsd/linux/musl/b32/mips.rs | 320 +++++ .../libc/src/unix/notbsd/linux/musl/b32/mod.rs | 50 + .../libc/src/unix/notbsd/linux/musl/b32/x86.rs | 335 +++++ .../libc/src/unix/notbsd/linux/musl/b64/aarch64.rs | 3 + .../libc/src/unix/notbsd/linux/musl/b64/mod.rs | 358 +++++ .../src/unix/notbsd/linux/musl/b64/powerpc64.rs | 3 + .../libc/src/unix/notbsd/linux/musl/b64/x86_64.rs | 20 + .../rust/libc/src/unix/notbsd/linux/musl/mod.rs | 243 ++++ .../libc/src/unix/notbsd/linux/other/b32/arm.rs | 151 ++ .../libc/src/unix/notbsd/linux/other/b32/mod.rs | 89 ++ .../src/unix/notbsd/linux/other/b32/powerpc.rs | 148 ++ .../libc/src/unix/notbsd/linux/other/b32/x86.rs | 196 +++ .../src/unix/notbsd/linux/other/b64/aarch64.rs | 179 +++ .../libc/src/unix/notbsd/linux/other/b64/mod.rs | 51 + .../src/unix/notbsd/linux/other/b64/powerpc64.rs | 176 +++ .../libc/src/unix/notbsd/linux/other/b64/x86_64.rs | 235 +++ .../rust/libc/src/unix/notbsd/linux/other/mod.rs | 559 ++++++++ .../rust/libc/src/unix/notbsd/linux/s390x.rs | 667 +++++++++ third_party/rust/libc/src/unix/notbsd/mod.rs | 859 +++++++++++ third_party/rust/libc/src/unix/solaris/mod.rs | 1040 ++++++++++++++ third_party/rust/libc/src/windows.rs | 193 +++ 77 files changed, 17312 insertions(+) create mode 100644 third_party/rust/libc/.cargo-checksum.json create mode 100644 third_party/rust/libc/.cargo-ok create mode 100644 third_party/rust/libc/.gitignore create mode 100644 third_party/rust/libc/.travis.yml create mode 100644 third_party/rust/libc/Cargo.toml create mode 100644 third_party/rust/libc/LICENSE-APACHE create mode 100644 third_party/rust/libc/LICENSE-MIT create mode 100644 third_party/rust/libc/README.md create mode 100644 third_party/rust/libc/appveyor.yml create mode 100644 third_party/rust/libc/ci/README.md create mode 100644 third_party/rust/libc/ci/docker/aarch64-unknown-linux-gnu/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/arm-linux-androideabi/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/i686-unknown-linux-gnu/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/i686-unknown-linux-musl/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/mips-unknown-linux-gnu/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/mipsel-unknown-linux-musl/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/powerpc-unknown-linux-gnu/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/x86_64-rumprun-netbsd/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/x86_64-unknown-freebsd/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/x86_64-unknown-linux-gnu/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/x86_64-unknown-linux-musl/Dockerfile create mode 100644 third_party/rust/libc/ci/docker/x86_64-unknown-openbsd/Dockerfile create mode 100644 third_party/rust/libc/ci/dox.sh create mode 100644 third_party/rust/libc/ci/landing-page-footer.html create mode 100644 third_party/rust/libc/ci/landing-page-head.html create mode 100644 third_party/rust/libc/ci/run-docker.sh create mode 100644 third_party/rust/libc/ci/run-qemu.sh create mode 100755 third_party/rust/libc/ci/run.sh create mode 100644 third_party/rust/libc/ci/style.rs create mode 100644 third_party/rust/libc/src/dox.rs create mode 100644 third_party/rust/libc/src/lib.rs create mode 100644 third_party/rust/libc/src/macros.rs create mode 100644 third_party/rust/libc/src/unix/bsd/apple/b32.rs create mode 100644 third_party/rust/libc/src/unix/bsd/apple/b64.rs create mode 100644 third_party/rust/libc/src/unix/bsd/apple/mod.rs create mode 100644 third_party/rust/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs create mode 100644 third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs create mode 100644 third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/x86.rs create mode 100644 third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs create mode 100644 third_party/rust/libc/src/unix/bsd/freebsdlike/mod.rs create mode 100644 third_party/rust/libc/src/unix/bsd/mod.rs create mode 100644 third_party/rust/libc/src/unix/bsd/openbsdlike/bitrig.rs create mode 100644 third_party/rust/libc/src/unix/bsd/openbsdlike/mod.rs create mode 100644 third_party/rust/libc/src/unix/bsd/openbsdlike/netbsd.rs create mode 100644 third_party/rust/libc/src/unix/bsd/openbsdlike/openbsd.rs create mode 100644 third_party/rust/libc/src/unix/mod.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/android/b32.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/android/b64.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/android/mod.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/mips.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/mips64.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/mod.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/b32/arm.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/b32/asmjs.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/b32/mips.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/b32/mod.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/b32/x86.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/b64/aarch64.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/b64/mod.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/b64/powerpc64.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/b64/x86_64.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/musl/mod.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/other/b32/arm.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/other/b32/mod.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/other/b32/powerpc.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/other/b32/x86.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/other/b64/aarch64.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/other/b64/mod.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/other/b64/powerpc64.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/other/b64/x86_64.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/other/mod.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/linux/s390x.rs create mode 100644 third_party/rust/libc/src/unix/notbsd/mod.rs create mode 100644 third_party/rust/libc/src/unix/solaris/mod.rs create mode 100644 third_party/rust/libc/src/windows.rs (limited to 'third_party/rust/libc') diff --git a/third_party/rust/libc/.cargo-checksum.json b/third_party/rust/libc/.cargo-checksum.json new file mode 100644 index 000000000..ee36ceb6f --- /dev/null +++ b/third_party/rust/libc/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"7150ee9391a955b2ef7e0762fc61c0c1aab167620ca36d88d78062d93b8334ba",".travis.yml":"408ea7ebf4efd8760be7ee2bede160f95eacc79fd64361eb9d416aa3469c8562","Cargo.toml":"f467b45e724b7fcb97936997c026f1950847a5c240a17581ccb27c9051dc8498","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"6294cbbc2515a519dc3f1bb50573bb83f4fbb24cfc093a1d7f2a9cdd2240a3b7","appveyor.yml":"2d5f521a9166515b085b7e2d330152b717589815fd2471adab57cf1191638ac0","ci/README.md":"be804f15e2128e5fd4b160cb0b13cff5f19e7d77b55ec5254aa6fd8731c84f0d","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"e3a31e7e899bb3976f26a2be6f075ab329777bebe893cfeea70020f7e2868661","ci/docker/arm-linux-androideabi/Dockerfile":"c3d60f2ba389e60e59cb6973542751c66a0e7bd484e11589c8ee7346e9ff2bab","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"1e9bd9c78bbd5a046043edf89f64772d69f447e4c8d88f23d44faa7d68e15c52","ci/docker/i686-unknown-linux-gnu/Dockerfile":"8fdba666cd9356fd4532de06d799d3c487abd870509362c3892a5193a1b7c94e","ci/docker/i686-unknown-linux-musl/Dockerfile":"efd110211fc9489aeb063a40a69e3a24f4d7f6174343dd203859d61e47403290","ci/docker/mips-unknown-linux-gnu/Dockerfile":"cc65290d3e5f189be836a0883fac41bbe709d1437a6691c3cbe18104f7c55277","ci/docker/mipsel-unknown-linux-musl/Dockerfile":"aace107e36ff42af705f0b652bb935982048a6c657acffbf7df47c59778b6469","ci/docker/powerpc-unknown-linux-gnu/Dockerfile":"e334ace0c994bda4f8db63fc2cb51780d0056ea3f47a4fe735f6b571e59eec7e","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"e643db60f36ebeefda02d51bbc036c63102b8a1c106e2404c392891bb1aea0a9","ci/docker/x86_64-rumprun-netbsd/Dockerfile":"44c3107fb30380785aaed6ff73fa334017a5bb4e3b5c7d4876154f09023a2b99","ci/docker/x86_64-unknown-freebsd/Dockerfile":"2cb917b02a0736b9dd5ce8a44922e9a9f468ba431747ef1e0d36de5b07681962","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"4fd4698b6322be510a1529fc98fab1c90b86545e41a7b68c51798b17b9bec664","ci/docker/x86_64-unknown-linux-musl/Dockerfile":"cd7a0d93e7c715e7c40d1dd763b43054a15c1d239ec2bd48d3624627e7ab2095","ci/docker/x86_64-unknown-openbsd/Dockerfile":"a756b32086d80cf937be7c136ac088146ad7dfe1c0b2fa18786bc867dd382fbc","ci/dox.sh":"2161cb17ee0d6a2279a64149c6b7c73a5b2eab344f248ea1fa0e6c8f6335ec5f","ci/landing-page-footer.html":"b70b3112c2147f5c967e7481061ef38bc2d79a28dd55a16fb916d9c9426da2c4","ci/landing-page-head.html":"ad69663fac7924f27d0209bc519d55838e86edfc4133713a6fd08caadac1b142","ci/run-docker.sh":"d17d1f854c9414155ed54a7738acf3330637ce81923b50c238bdaa761ef10153","ci/run-qemu.sh":"4f9dd0a9011ca140e3482bb49e56fc21576c1c234eb7ff2782a6bf1aa34f3453","ci/run.sh":"d1548d31b0b538ecd01fe0bdf6c0ff746969e14392ac4127a6c02a49d4e0ecc9","ci/style.rs":"60564abc1d5197ed1598426dd0d6ee9939a16d2875b03373538f58843bb616c4","src/dox.rs":"eb6fbcc0b8b59430271bb71ee023961fd165337fc5fd6ca433882457a3c735bd","src/lib.rs":"4cece0e880ec8731913e5110b58d1b134148b0a43e72d6b990c1d999916fc706","src/macros.rs":"bd9802772b0e5c8b3c550d1c24307f06c0d1e4ce656b4ae1cf092142bbe5412c","src/unix/bsd/apple/b32.rs":"110ecff78da0e8d405d861447904da403d8b3f6da1f0f9dc9987633f3f04fe46","src/unix/bsd/apple/b64.rs":"e6808081c0b276cca3189628716f507c7c0d00b62417cd44addbdaefe848cec7","src/unix/bsd/apple/mod.rs":"e1effb590ae2da9613068df7367ab46ceba50d31fe35b8b06eaa1d9bb3e8ae6e","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"7784fa437c303616e58480be9b30e1a49da88e9f6154c509985f6d46f36a9e47","src/unix/bsd/freebsdlike/freebsd/mod.rs":"223109596e0dc431a4fa121e22d6ee768731205bfb333973af3b334bc582ee58","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"c7f46b9ae23fde5a9e245a28ed1380066e67f081323b4d253a18e9da3b97b860","src/unix/bsd/freebsdlike/mod.rs":"3b93986960a523940c77ad2fe5d4f5eaaa589715fa02daa4bc0ef088bd2c22fd","src/unix/bsd/mod.rs":"9cfacc89c92b93809c94a59a81b5ac613482025c1ed47c2fcc0c26c0573dd113","src/unix/bsd/openbsdlike/bitrig.rs":"030cfb1ee0caa82dedddc40fd32f5709a862c22e1a6a5f16a43cbdcdfccb376d","src/unix/bsd/openbsdlike/mod.rs":"e4b968f3504c6e6fe327cb212ef623f7a90e8fbe817a6ff0b9c01898cb746128","src/unix/bsd/openbsdlike/netbsd.rs":"de9ae04cf9a04ec3855339a76f3b42cfe1c80395e8dc9ab8d10bf69431746007","src/unix/bsd/openbsdlike/openbsd.rs":"2c3004cd9f34c8d027c4dc418a7b62ef485599d4b2136d458a6414b78b8038f4","src/unix/mod.rs":"afd8a255c9e14da431e7e4ec395dd7379fc2b0d3d7f90fd717c0e23d1db3b8ff","src/unix/notbsd/android/b32.rs":"148e1b4ed8b4f700d5aa24178af925164176e1c18b54db877ced4b55ba9f03d4","src/unix/notbsd/android/b64.rs":"302caf0aa95fa022030717c58de17d85d814b04350eca081a722ec435bc4f217","src/unix/notbsd/android/mod.rs":"081802b334414a38e7cf4cbc07a44babdb65969053c6c73d9f345e323c601242","src/unix/notbsd/linux/mips.rs":"e61e24a6309752224fd3932fbff3a68d71f59fb131a4d205dfc13ea2c1594943","src/unix/notbsd/linux/mips64.rs":"c7f58c75ac50a8177d8970e893dfe619ef708de264cb1c1af7bb912246a78b18","src/unix/notbsd/linux/mod.rs":"716d55f8598acd718e9545f6a66ffb216e7fe51706f81c5f50147ee2b42f8d3d","src/unix/notbsd/linux/musl/b32/arm.rs":"2ab4cb00932e23364d6919ce09700d2ed36206d488f9390f3e2c6de965f85ae7","src/unix/notbsd/linux/musl/b32/asmjs.rs":"f57da63ac0b9b4b2e74ec54ec01ce34b04c9e7a4a3df62ac93be402538015883","src/unix/notbsd/linux/musl/b32/mips.rs":"f28c77e1716be8eafec4c8b76a9312b8bba3271fbd5b726a69f9f467482039d8","src/unix/notbsd/linux/musl/b32/mod.rs":"bd29a02c67b69791e7cabd7666503c35ed5322d244a005b9cc7fd0cb28b552a8","src/unix/notbsd/linux/musl/b32/x86.rs":"363e2eae846f2e6c26751d92b7e73fc6dd2d3cfb1465dff366251b92acf80da8","src/unix/notbsd/linux/musl/b64/aarch64.rs":"4009c7eaf703472daef2a70bdac910d9fc395a33689ef2e8cf1c4e692445d3f0","src/unix/notbsd/linux/musl/b64/mod.rs":"03c8391e509341385ea9458d40bdc013bee0645ae31ba3e2007aecf133853c08","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"dc28f5b7284235d6cf5519053cac59a1c16dc39223b71cca0871e4880755f852","src/unix/notbsd/linux/musl/b64/x86_64.rs":"43291acc0dfc92c2fec8ba6ce77ee9ca3c20bcdccec18e149f95ba911cee704b","src/unix/notbsd/linux/musl/mod.rs":"c707acce4a8f6eb7373f5bc7e77595b2e0fb7d390b3063b92558702d75cc504c","src/unix/notbsd/linux/other/b32/arm.rs":"cb0ea706eaf32733092524633acc3d34f4a140b0d7c2b4350698b9295a3f0e6a","src/unix/notbsd/linux/other/b32/mod.rs":"8b774feb5510b963ed031db7ab3d7e24f1ba5524a6396db0b851d237ccc16fd3","src/unix/notbsd/linux/other/b32/powerpc.rs":"89bef28c85fe6c81c2e661d9959692f5ada691658d69c8b9a2fb11d3b2ed1214","src/unix/notbsd/linux/other/b32/x86.rs":"aeafa92aca3b5bed951fe79081412068210cba91ef610ee2c007ba5da19ec3c6","src/unix/notbsd/linux/other/b64/aarch64.rs":"c198b3355d91a03e0ac8780ba7b58c1eb445db8beba7d9fa7704a0089174bc73","src/unix/notbsd/linux/other/b64/mod.rs":"dab63025ad3713a9a5f014283d4b3a3f6c3d167ae2bece29ee4b1d5f9489b6c7","src/unix/notbsd/linux/other/b64/powerpc64.rs":"06a795bca8e91a0143ef1787b034201ed7a21d01960ce9fe869d18c274d5bdb4","src/unix/notbsd/linux/other/b64/x86_64.rs":"5af4e657e04a863ac489de52294e7c4c34d191393d99e025a6fbbe1a26cac33f","src/unix/notbsd/linux/other/mod.rs":"3e6cbc19efba21029ae93d8f5aaf502f422cb03336c1f687c10f96efc1cf55c3","src/unix/notbsd/linux/s390x.rs":"9293453eb87dc6b134c50593ca1d92eac338a7c39091db9ce66ba2394058cb49","src/unix/notbsd/mod.rs":"3beb490a9f1f9473ec0241b30ad8da4eae2de01aa7225257ba60eb48ae248adc","src/unix/solaris/mod.rs":"a1b0cf6b80963aff8e0f472306d8a43a26c40fcd8d9fdee29f1a25618a88f781","src/windows.rs":"7bed60392ae1552b4404b38bac7151f00f26f8d6568c1b845301bfb2346fd505"},"package":"408014cace30ee0f767b1c4517980646a573ec61a57957aeeabcac8ac0a02e8d"} \ No newline at end of file diff --git a/third_party/rust/libc/.cargo-ok b/third_party/rust/libc/.cargo-ok new file mode 100644 index 000000000..e69de29bb diff --git a/third_party/rust/libc/.gitignore b/third_party/rust/libc/.gitignore new file mode 100644 index 000000000..f0ff2599d --- /dev/null +++ b/third_party/rust/libc/.gitignore @@ -0,0 +1,3 @@ +target +Cargo.lock +*~ diff --git a/third_party/rust/libc/.travis.yml b/third_party/rust/libc/.travis.yml new file mode 100644 index 000000000..d0e95910d --- /dev/null +++ b/third_party/rust/libc/.travis.yml @@ -0,0 +1,119 @@ +language: rust +sudo: required +dist: trusty +services: + - docker +install: + - curl https://static.rust-lang.org/rustup.sh | + sh -s -- --add-target=$TARGET --disable-sudo -y --prefix=`rustc --print sysroot` +script: + - cargo build + - cargo build --no-default-features + - cargo generate-lockfile --manifest-path libc-test/Cargo.toml + - if [[ $TRAVIS_OS_NAME = "linux" ]]; then + sh ci/run-docker.sh $TARGET; + else + export CARGO_TARGET_DIR=`pwd`/target; + sh ci/run.sh $TARGET; + fi + - rustc ci/style.rs && ./style src +osx_image: xcode7.3 +env: + global: + secure: eIDEoQdTyglcsTD13zSGotAX2HDhRSXIaaTnVZTThqLSrySOc3/6KY3qmOc2Msf7XaBqfFy9QA+alk7OwfePp253eiy1Kced67ffjjFOytEcRT7FlQiYpcYQD6WNHZEj62/bJBO4LTM9sGtWNCTJVEDKW0WM8mUK7qNuC+honPM= +matrix: + include: + # 1.0.0 compat + - os: linux + env: TARGET=x86_64-unknown-linux-gnu + rust: 1.0.0 + script: cargo build + install: + + # build documentation + - os: linux + env: TARGET=x86_64-unknown-linux-gnu + rust: stable + script: sh ci/dox.sh + + # stable compat + - os: linux + env: TARGET=x86_64-unknown-linux-gnu + rust: stable + - os: linux + env: TARGET=i686-unknown-linux-gnu + rust: stable + - os: osx + env: TARGET=x86_64-apple-darwin + rust: stable + - os: osx + env: TARGET=i686-apple-darwin + rust: stable + - os: linux + env: TARGET=arm-linux-androideabi + rust: stable + - os: linux + env: TARGET=x86_64-unknown-linux-musl + rust: stable + - os: linux + env: TARGET=i686-unknown-linux-musl + rust: stable + - os: linux + env: TARGET=arm-unknown-linux-gnueabihf + rust: stable + - os: linux + env: TARGET=aarch64-unknown-linux-gnu + rust: stable + - os: osx + env: TARGET=i386-apple-ios + rust: stable + - os: osx + env: TARGET=x86_64-apple-ios + rust: stable + - os: linux + env: TARGET=x86_64-rumprun-netbsd + rust: stable + - os: linux + env: TARGET=powerpc-unknown-linux-gnu + rust: stable + - os: linux + env: TARGET=powerpc64-unknown-linux-gnu + rust: stable + - os: linux + env: TARGET=mipsel-unknown-linux-musl + rust: stable + + # beta + - os: linux + env: TARGET=x86_64-unknown-linux-gnu + rust: beta + - os: osx + env: TARGET=x86_64-apple-darwin + rust: beta + + # nightly + - os: linux + env: TARGET=x86_64-unknown-linux-gnu + rust: nightly + - os: osx + env: TARGET=x86_64-apple-darwin + rust: nightly + - os: linux + env: TARGET=mips-unknown-linux-gnu + # not sure why this has to be nightly... + rust: nightly + + # QEMU based targets that compile in an emulator + - os: linux + env: TARGET=x86_64-unknown-freebsd + rust: stable + - os: linux + env: TARGET=x86_64-unknown-openbsd QEMU=openbsd.qcow2 + rust: stable + script: sh ci/run-docker.sh $TARGET + install: + +notifications: + email: + on_success: never + webhooks: https://buildbot.rust-lang.org/homu/travis diff --git a/third_party/rust/libc/Cargo.toml b/third_party/rust/libc/Cargo.toml new file mode 100644 index 000000000..a863aa6b0 --- /dev/null +++ b/third_party/rust/libc/Cargo.toml @@ -0,0 +1,18 @@ +[package] + +name = "libc" +version = "0.2.16" +authors = ["The Rust Project Developers"] +license = "MIT/Apache-2.0" +readme = "README.md" +repository = "https://github.com/rust-lang/libc" +homepage = "https://github.com/rust-lang/libc" +documentation = "http://doc.rust-lang.org/libc" +description = """ +A library for types and bindings to native C functions often found in libc or +other common platform libraries. +""" + +[features] +default = ["use_std"] +use_std = [] diff --git a/third_party/rust/libc/LICENSE-APACHE b/third_party/rust/libc/LICENSE-APACHE new file mode 100644 index 000000000..16fe87b06 --- /dev/null +++ b/third_party/rust/libc/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/third_party/rust/libc/LICENSE-MIT b/third_party/rust/libc/LICENSE-MIT new file mode 100644 index 000000000..39d4bdb5a --- /dev/null +++ b/third_party/rust/libc/LICENSE-MIT @@ -0,0 +1,25 @@ +Copyright (c) 2014 The Rust Project Developers + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/third_party/rust/libc/README.md b/third_party/rust/libc/README.md new file mode 100644 index 000000000..09b9a567b --- /dev/null +++ b/third_party/rust/libc/README.md @@ -0,0 +1,135 @@ +libc +==== + +A Rust library with native bindings to the types and functions commonly found on +various systems, including libc. + +[![Build Status](https://travis-ci.org/rust-lang/libc.svg?branch=master)](https://travis-ci.org/rust-lang/libc) +[![Build status](https://ci.appveyor.com/api/projects/status/34csq3uurnw7c0rl?svg=true)](https://ci.appveyor.com/project/alexcrichton/libc) + +[Documentation](#platforms-and-documentation) + +## Usage + +First, add the following to your `Cargo.toml`: + +```toml +[dependencies] +libc = "0.2" +``` + +Next, add this to your crate root: + +```rust +extern crate libc; +``` + +Currently libc by default links to the standard library, but if you would +instead like to use libc in a `#![no_std]` situation or crate you can request +this via: + +```toml +[dependencies] +libc = { version = "0.2", default-features = false } +``` + +## What is libc? + +The primary purpose of this crate is to provide all of the definitions necessary +to easily interoperate with C code (or "C-like" code) on each of the platforms +that Rust supports. This includes type definitions (e.g. `c_int`), constants +(e.g. `EINVAL`) as well as function headers (e.g. `malloc`). + +This crate does not strive to have any form of compatibility across platforms, +but rather it is simply a straight binding to the system libraries on the +platform in question. + +## Public API + +This crate exports all underlying platform types, functions, and constants under +the crate root, so all items are accessible as `libc::foo`. The types and values +of all the exported APIs match the platform that libc is compiled for. + +More detailed information about the design of this library can be found in its +[associated RFC][rfc]. + +[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1291-promote-libc.md + +## Adding an API + +Want to use an API which currently isn't bound in `libc`? It's quite easy to add +one! + +The internal structure of this crate is designed to minimize the number of +`#[cfg]` attributes in order to easily be able to add new items which apply +to all platforms in the future. As a result, the crate is organized +hierarchically based on platform. Each module has a number of `#[cfg]`'d +children, but only one is ever actually compiled. Each module then reexports all +the contents of its children. + +This means that for each platform that libc supports, the path from a +leaf module to the root will contain all bindings for the platform in question. +Consequently, this indicates where an API should be added! Adding an API at a +particular level in the hierarchy means that it is supported on all the child +platforms of that level. For example, when adding a Unix API it should be added +to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to +`src/unix/notbsd/linux/mod.rs`. + +If you're not 100% sure at what level of the hierarchy an API should be added +at, fear not! This crate has CI support which tests any binding against all +platforms supported, so you'll see failures if an API is added at the wrong +level or has different signatures across platforms. + +With that in mind, the steps for adding a new API are: + +1. Determine where in the module hierarchy your API should be added. +2. Add the API. +3. Send a PR to this repo. +4. Wait for CI to pass, fixing errors. +5. Wait for a merge! + +### Test before you commit + +We have two automated tests running on [Travis](https://travis-ci.org/rust-lang/libc): + +1. [`libc-test`](https://github.com/alexcrichton/ctest) + - `cd libc-test && cargo run` + - Use the `skip_*()` functions in `build.rs` if you really need a workaround. +2. Style checker + - `rustc ci/style.rs && ./style src` + +## Platforms and Documentation + +The following platforms are currently tested and have documentation available: + +Tested: + * [`i686-pc-windows-msvc`](https://doc.rust-lang.org/libc/i686-pc-windows-msvc/libc/) + * [`x86_64-pc-windows-msvc`](https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc/libc/) + (Windows) + * [`i686-pc-windows-gnu`](https://doc.rust-lang.org/libc/i686-pc-windows-gnu/libc/) + * [`x86_64-pc-windows-gnu`](https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu/libc/) + * [`i686-apple-darwin`](https://doc.rust-lang.org/libc/i686-apple-darwin/libc/) + * [`x86_64-apple-darwin`](https://doc.rust-lang.org/libc/x86_64-apple-darwin/libc/) + (OSX) + * `i686-apple-ios` + * `x86_64-apple-ios` + * [`i686-unknown-linux-gnu`](https://doc.rust-lang.org/libc/i686-unknown-linux-gnu/libc/) + * [`x86_64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu/libc/) + (Linux) + * [`x86_64-unknown-linux-musl`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl/libc/) + (Linux MUSL) + * [`aarch64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu/libc/) + * [`mips-unknown-linux-gnu`](https://doc.rust-lang.org/libc/mips-unknown-linux-gnu/libc/) + * [`arm-unknown-linux-gnueabihf`](https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf/libc/) + * [`arm-linux-androideabi`](https://doc.rust-lang.org/libc/arm-linux-androideabi/libc/) + (Android) + * [`x86_64-unknown-freebsd`](https://doc.rust-lang.org/libc/x86_64-unknown-freebsd/libc/) + * [`x86_64-unknown-openbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-openbsd/libc/) + * [`x86_64-rumprun-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/) + +The following may be supported, but are not guaranteed to always work: + + * `i686-unknown-freebsd` + * [`x86_64-unknown-bitrig`](https://doc.rust-lang.org/libc/x86_64-unknown-bitrig/libc/) + * [`x86_64-unknown-dragonfly`](https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly/libc/) + * [`x86_64-unknown-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/) diff --git a/third_party/rust/libc/appveyor.yml b/third_party/rust/libc/appveyor.yml new file mode 100644 index 000000000..de4388426 --- /dev/null +++ b/third_party/rust/libc/appveyor.yml @@ -0,0 +1,21 @@ +environment: + matrix: + - TARGET: x86_64-pc-windows-gnu + MSYS2_BITS: 64 + - TARGET: i686-pc-windows-gnu + MSYS2_BITS: 32 + - TARGET: x86_64-pc-windows-msvc + - TARGET: i686-pc-windows-msvc +install: + - curl -sSf -o rustup-init.exe https://win.rustup.rs/ + - rustup-init.exe -y --default-host %TARGET% + - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin + - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin + - rustc -V + - cargo -V + +build: false + +test_script: + - cargo test + - cargo run --manifest-path libc-test/Cargo.toml diff --git a/third_party/rust/libc/ci/README.md b/third_party/rust/libc/ci/README.md new file mode 100644 index 000000000..13c7c8da5 --- /dev/null +++ b/third_party/rust/libc/ci/README.md @@ -0,0 +1,203 @@ +The goal of the libc crate is to have CI running everywhere to have the +strongest guarantees about the definitions that this library contains, and as a +result the CI is pretty complicated and also pretty large! Hopefully this can +serve as a guide through the sea of scripts in this directory and elsewhere in +this project. + +# Files + +First up, let's talk about the files in this directory: + +* `run-travis.sh` - a shell script run by all Travis builders, this is + responsible for setting up the rest of the environment such as installing new + packages, downloading Rust target libraries, etc. + +* `run.sh` - the actual script which runs tests for a particular architecture. + Called from the `run-travis.sh` script this will run all tests for the target + specified. + +* `cargo-config` - Cargo configuration of linkers to use copied into place by + the `run-travis.sh` script before builds are run. + +* `dox.sh` - script called from `run-travis.sh` on only the linux 64-bit nightly + Travis bots to build documentation for this crate. + +* `landing-page-*.html` - used by `dox.sh` to generate a landing page for all + architectures' documentation. + +* `run-qemu.sh` - see discussion about QEMU below + +* `mips`, `rumprun` - instructions to build the docker image for each respective + CI target + +# CI Systems + +Currently this repository leverages a combination of Travis CI and AppVeyor for +running tests. The triples tested are: + +* AppVeyor + * `{i686,x86_64}-pc-windows-{msvc,gnu}` +* Travis + * `{i686,x86_64,mips,aarch64}-unknown-linux-gnu` + * `x86_64-unknown-linux-musl` + * `arm-unknown-linux-gnueabihf` + * `arm-linux-androideabi` + * `{i686,x86_64}-apple-{darwin,ios}` + * `x86_64-rumprun-netbsd` + * `x86_64-unknown-freebsd` + * `x86_64-unknown-openbsd` + +The Windows triples are all pretty standard, they just set up their environment +then run tests, no need for downloading any extra target libs (we just download +the right installer). The Intel Linux/OSX builds are similar in that we just +download the right target libs and run tests. Note that the Intel Linux/OSX +builds are run on stable/beta/nightly, but are the only ones that do so. + +The remaining architectures look like: + +* Android runs in a [docker image][android-docker] with an emulator, the NDK, + and the SDK already set up. The entire build happens within the docker image. +* The MIPS, ARM, and AArch64 builds all use the QEMU userspace emulator to run + the generated binary to actually verify the tests pass. +* The MUSL build just has to download a MUSL compiler and target libraries and + then otherwise runs tests normally. +* iOS builds need an extra linker flag currently, but beyond that they're built + as standard as everything else. +* The rumprun target builds an entire kernel from the test suite and then runs + it inside QEMU using the serial console to test whether it succeeded or + failed. +* The BSD builds, currently OpenBSD and FreeBSD, use QEMU to boot up a system + and compile/run tests. More information on that below. + +[android-docker]: https://github.com/rust-lang/rust-buildbot/blob/master/slaves/android/Dockerfile + +## QEMU + +Lots of the architectures tested here use QEMU in the tests, so it's worth going +over all the crazy capabilities QEMU has and the various flavors in which we use +it! + +First up, QEMU has userspace emulation where it doesn't boot a full kernel, it +just runs a binary from another architecture (using the `qemu-` wrappers). +We provide it the runtime path for the dynamically loaded system libraries, +however. This strategy is used for all Linux architectures that aren't intel. +Note that one downside of this QEMU system is that threads are barely +implemented, so we're careful to not spawn many threads. + +For the rumprun target the only output is a kernel image, so we just use that +plus the `rumpbake` command to create a full kernel image which is then run from +within QEMU. + +Finally, the fun part, the BSDs. Quite a few hoops are jumped through to get CI +working for these platforms, but the gist of it looks like: + +* Cross compiling from Linux to any of the BSDs seems to be quite non-standard. + We may be able to get it working but it might be difficult at that point to + ensure that the libc definitions align with what you'd get on the BSD itself. + As a result, we try to do compiles within the BSD distro. +* On Travis we can't run a VM-in-a-VM, so we resort to userspace emulation + (QEMU). +* Unfortunately on Travis we also can't use KVM, so the emulation is super slow. + +With all that in mind, the way BSD is tested looks like: + +1. Download a pre-prepared image for the OS being tested. +2. Generate the tests for the OS being tested. This involves running the `ctest` + library over libc to generate a Rust file and a C file which will then be + compiled into the final test. +3. Generate a disk image which will later be mounted by the OS being tested. + This image is mostly just the libc directory, but some modifications are made + to compile the generated files from step 2. +4. The kernel is booted in QEMU, and it is configured to detect the libc-test + image being available, run the test script, and then shut down afterwards. +5. Look for whether the tests passed in the serial console output of the kernel. + +There's some pretty specific instructions for setting up each image (detailed +below), but the main gist of this is that we must avoid a vanilla `cargo run` +inside of the `libc-test` directory (which is what it's intended for) because +that would compile `syntex_syntax`, a large library, with userspace emulation. +This invariably times out on Travis, so we can't do that. + +Once all those hoops are jumped through, however, we can be happy that we're +testing almost everything! + +Below are some details of how to set up the initial OS images which are +downloaded. Each image must be enabled have input/output over the serial +console, log in automatically at the serial console, detect if a second drive in +QEMU is available, and if so mount it, run a script (it'll specifically be +`run-qemu.sh` in this folder which is copied into the generated image talked +about above), and then shut down. + +### QEMU setup - FreeBSD + +1. Download CD installer (most minimal is fine) +2. `qemu-img create -f qcow2 foo.qcow2 2G` +3. `qemu -cdrom foo.iso -drive if=virtio,file=foo.qcow2 -net nic,model=virtio -net user` +4. run installer +5. `echo 'console="comconsole"' >> /boot/loader.conf` +6. `echo 'autoboot_delay="0"' >> /boot/loader.conf` +7. look at /etc/ttys, see what getty argument is for ttyu0 +8. edit /etc/gettytab, look for ttyu0 argument, prepend `:al=root` to line + beneath + +(note that the current image has a `freebsd` user, but this isn't really +necessary) + +Once that's done, arrange for this script to run at login: + +``` +#!/bin/sh + +sudo kldload ext2fs +[ -e /dev/vtbd1 ] || exit 0 +sudo mount -t ext2fs /dev/vtbd1 /mnt +sh /mnt/run.sh /mnt +sudo poweroff +``` + +Helpful links + +* https://en.wikibooks.org/wiki/QEMU/Images +* https://blog.nekoconeko.nl/blog/2015/06/04/creating-an-openstack-freebsd-image.html +* https://www.freebsd.org/doc/handbook/serialconsole-setup.html + + +### QEMU setup - OpenBSD + +1. Download CD installer +2. `qemu-img create -f qcow2 foo.qcow2 2G` +3. `qemu -cdrom foo.iso -drive if=virtio,file=foo.qcow2 -net nic,model=virtio -net user` +4. run installer +5. `echo 'set tty com0' >> /etc/boot.conf` +6. `echo 'boot' >> /etc/boot.conf` +7. Modify /etc/ttys, change the `tty00` at the end from 'unknown off' to + 'vt220 on secure' +8. Modify same line in /etc/ttys to have `"/root/foo.sh"` as the shell +9. Add this script to `/root/foo.sh` + +``` +#!/bin/sh +exec 1>/dev/tty00 +exec 2>&1 + +if mount -t ext2fs /dev/sd1c /mnt; then + sh /mnt/run.sh /mnt + shutdown -ph now +fi + +# limited shell... +exec /bin/sh < /dev/tty00 +``` + +10. `chmod +x /root/foo.sh` + +Helpful links: + +* https://en.wikibooks.org/wiki/QEMU/Images +* http://www.openbsd.org/faq/faq7.html#SerCon + +# Questions? + +Hopefully that's at least somewhat of an introduction to everything going on +here, and feel free to ping @alexcrichton with questions! + diff --git a/third_party/rust/libc/ci/docker/aarch64-unknown-linux-gnu/Dockerfile b/third_party/rust/libc/ci/docker/aarch64-unknown-linux-gnu/Dockerfile new file mode 100644 index 000000000..1c7235cd0 --- /dev/null +++ b/third_party/rust/libc/ci/docker/aarch64-unknown-linux-gnu/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu:14.04 +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc libc6-dev ca-certificates \ + gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user +ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ + PATH=$PATH:/rust/bin diff --git a/third_party/rust/libc/ci/docker/arm-linux-androideabi/Dockerfile b/third_party/rust/libc/ci/docker/arm-linux-androideabi/Dockerfile new file mode 100644 index 000000000..0e41ba6db --- /dev/null +++ b/third_party/rust/libc/ci/docker/arm-linux-androideabi/Dockerfile @@ -0,0 +1,4 @@ +FROM alexcrichton/rust-slave-android:2015-11-22 +ENV CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \ + PATH=$PATH:/rust/bin +ENTRYPOINT ["sh"] diff --git a/third_party/rust/libc/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile b/third_party/rust/libc/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile new file mode 100644 index 000000000..3a858e388 --- /dev/null +++ b/third_party/rust/libc/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu:16.04 +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc libc6-dev ca-certificates \ + gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user +ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \ + PATH=$PATH:/rust/bin diff --git a/third_party/rust/libc/ci/docker/i686-unknown-linux-gnu/Dockerfile b/third_party/rust/libc/ci/docker/i686-unknown-linux-gnu/Dockerfile new file mode 100644 index 000000000..63450ff9e --- /dev/null +++ b/third_party/rust/libc/ci/docker/i686-unknown-linux-gnu/Dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:16.04 +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc-multilib libc6-dev ca-certificates +ENV PATH=$PATH:/rust/bin diff --git a/third_party/rust/libc/ci/docker/i686-unknown-linux-musl/Dockerfile b/third_party/rust/libc/ci/docker/i686-unknown-linux-musl/Dockerfile new file mode 100644 index 000000000..89d60ff7b --- /dev/null +++ b/third_party/rust/libc/ci/docker/i686-unknown-linux-musl/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc make libc6-dev git curl ca-certificates +RUN curl https://www.musl-libc.org/releases/musl-1.1.14.tar.gz | \ + tar xzf - && \ + cd musl-1.1.14 && \ + CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \ + make install -j4 && \ + cd .. && \ + rm -rf musl-1.1.14 +ENV PATH=$PATH:/musl-i686/bin:/rust/bin diff --git a/third_party/rust/libc/ci/docker/mips-unknown-linux-gnu/Dockerfile b/third_party/rust/libc/ci/docker/mips-unknown-linux-gnu/Dockerfile new file mode 100644 index 000000000..6194026af --- /dev/null +++ b/third_party/rust/libc/ci/docker/mips-unknown-linux-gnu/Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc libc6-dev qemu-user ca-certificates \ + gcc-mips-linux-gnu libc6-dev-mips-cross \ + qemu-system-mips + +ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \ + PATH=$PATH:/rust/bin diff --git a/third_party/rust/libc/ci/docker/mipsel-unknown-linux-musl/Dockerfile b/third_party/rust/libc/ci/docker/mipsel-unknown-linux-musl/Dockerfile new file mode 100644 index 000000000..bf7b45b75 --- /dev/null +++ b/third_party/rust/libc/ci/docker/mipsel-unknown-linux-musl/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \ + bzip2 + +RUN mkdir /toolchain +RUN curl -L https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \ + tar xjf - -C /toolchain --strip-components=2 + +ENV PATH=$PATH:/rust/bin:/toolchain/bin \ + CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \ + CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-gcc diff --git a/third_party/rust/libc/ci/docker/powerpc-unknown-linux-gnu/Dockerfile b/third_party/rust/libc/ci/docker/powerpc-unknown-linux-gnu/Dockerfile new file mode 100644 index 000000000..052db4903 --- /dev/null +++ b/third_party/rust/libc/ci/docker/powerpc-unknown-linux-gnu/Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc libc6-dev qemu-user ca-certificates \ + gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \ + qemu-system-ppc + +ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \ + PATH=$PATH:/rust/bin diff --git a/third_party/rust/libc/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile b/third_party/rust/libc/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile new file mode 100644 index 000000000..03ce673e5 --- /dev/null +++ b/third_party/rust/libc/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc libc6-dev qemu-user ca-certificates \ + gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \ + qemu-system-ppc + +ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \ + CC=powerpc64-linux-gnu-gcc \ + PATH=$PATH:/rust/bin diff --git a/third_party/rust/libc/ci/docker/x86_64-rumprun-netbsd/Dockerfile b/third_party/rust/libc/ci/docker/x86_64-rumprun-netbsd/Dockerfile new file mode 100644 index 000000000..129771e76 --- /dev/null +++ b/third_party/rust/libc/ci/docker/x86_64-rumprun-netbsd/Dockerfile @@ -0,0 +1,6 @@ +FROM mato/rumprun-toolchain-hw-x86_64 +USER root +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + qemu +ENV PATH=$PATH:/rust/bin diff --git a/third_party/rust/libc/ci/docker/x86_64-unknown-freebsd/Dockerfile b/third_party/rust/libc/ci/docker/x86_64-unknown-freebsd/Dockerfile new file mode 100644 index 000000000..bffcaa0ce --- /dev/null +++ b/third_party/rust/libc/ci/docker/x86_64-unknown-freebsd/Dockerfile @@ -0,0 +1,13 @@ +FROM alexcrichton/rust-slave-linux-cross:2016-04-15 +USER root + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + qemu qemu-kvm kmod cpu-checker + +ENTRYPOINT ["sh"] + +ENV PATH=$PATH:/rust/bin \ + QEMU=freebsd.qcow2 \ + CAN_CROSS=1 \ + CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER=x86_64-unknown-freebsd10-gcc diff --git a/third_party/rust/libc/ci/docker/x86_64-unknown-linux-gnu/Dockerfile b/third_party/rust/libc/ci/docker/x86_64-unknown-linux-gnu/Dockerfile new file mode 100644 index 000000000..294a0621c --- /dev/null +++ b/third_party/rust/libc/ci/docker/x86_64-unknown-linux-gnu/Dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:16.04 +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc libc6-dev ca-certificates +ENV PATH=$PATH:/rust/bin diff --git a/third_party/rust/libc/ci/docker/x86_64-unknown-linux-musl/Dockerfile b/third_party/rust/libc/ci/docker/x86_64-unknown-linux-musl/Dockerfile new file mode 100644 index 000000000..f44003806 --- /dev/null +++ b/third_party/rust/libc/ci/docker/x86_64-unknown-linux-musl/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc make libc6-dev git curl ca-certificates +RUN curl https://www.musl-libc.org/releases/musl-1.1.14.tar.gz | \ + tar xzf - && \ + cd musl-1.1.14 && \ + ./configure --prefix=/musl-x86_64 && \ + make install -j4 && \ + cd .. && \ + rm -rf musl-1.1.14 +ENV PATH=$PATH:/musl-x86_64/bin:/rust/bin diff --git a/third_party/rust/libc/ci/docker/x86_64-unknown-openbsd/Dockerfile b/third_party/rust/libc/ci/docker/x86_64-unknown-openbsd/Dockerfile new file mode 100644 index 000000000..f0343c136 --- /dev/null +++ b/third_party/rust/libc/ci/docker/x86_64-unknown-openbsd/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu:16.04 + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + gcc libc6-dev qemu qemu-kvm curl ca-certificates kmod cpu-checker +ENV PATH=$PATH:/rust/bin \ + QEMU=openbsd.qcow2 diff --git a/third_party/rust/libc/ci/dox.sh b/third_party/rust/libc/ci/dox.sh new file mode 100644 index 000000000..88d882dca --- /dev/null +++ b/third_party/rust/libc/ci/dox.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +# Builds documentation for all target triples that we have a registered URL for +# in liblibc. This scrapes the list of triples to document from `src/lib.rs` +# which has a bunch of `html_root_url` directives we pick up. + +set -e + +TARGETS=`grep html_root_url src/lib.rs | sed 's/.*".*\/\(.*\)"/\1/'` + +rm -rf target/doc +mkdir -p target/doc + +cp ci/landing-page-head.html target/doc/index.html + +for target in $TARGETS; do + echo documenting $target + + rustdoc -o target/doc/$target --target $target src/lib.rs --cfg dox \ + --crate-name libc + + echo "
  • $target
  • " \ + >> target/doc/index.html +done + +cat ci/landing-page-footer.html >> target/doc/index.html + +# If we're on travis, not a PR, and on the right branch, publish! +if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then + pip install ghp-import --user $USER + $HOME/.local/bin/ghp-import -n target/doc + git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages +fi diff --git a/third_party/rust/libc/ci/landing-page-footer.html b/third_party/rust/libc/ci/landing-page-footer.html new file mode 100644 index 000000000..941cc8d2b --- /dev/null +++ b/third_party/rust/libc/ci/landing-page-footer.html @@ -0,0 +1,3 @@ + + + diff --git a/third_party/rust/libc/ci/landing-page-head.html b/third_party/rust/libc/ci/landing-page-head.html new file mode 100644 index 000000000..fc69fa88e --- /dev/null +++ b/third_party/rust/libc/ci/landing-page-head.html @@ -0,0 +1,7 @@ + + + + + + +