platform_build_soong/ui/build/Android.bp
Dan Willemsen c59a92cb1a Revert "Revert "Add path interposer""
This reverts commit 96c957ae20.

Fixes issues on some machines where the socket in TMPDIR ended up with a
unix domain socket pathname over 107 characters long, which Go will
reject due to underlying limitations in the system calls. If this
happens, we'll fall back to opening the directory, then using
/proc/self/fd/#/<file>, or manually creating a similar symlink in /tmp.

Also fixes some issues on Mac where os.Executable returns the symlink
instead of the underlying file, sending a message over a unix domain
socket will block if the reader isn't reading, and sandboxing was
preventing us from running `ps`.

Test: m blueprint_tools
Test: m blueprint_tools on mac
Change-Id: Ib19ccfe10cb0a79f1476fb1d5cd20ed0495be367
2018-05-25 14:07:00 -07:00

74 lines
1.8 KiB
Text

// Copyright 2017 Google Inc. All rights reserved.
//
// 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.
bootstrap_go_package {
name: "soong-ui-build-paths",
pkgPath: "android/soong/ui/build/paths",
srcs: [
"paths/config.go",
"paths/logs.go",
],
testSrcs: [
"paths/logs_test.go",
],
}
bootstrap_go_package {
name: "soong-ui-build",
pkgPath: "android/soong/ui/build",
deps: [
"soong-ui-build-paths",
"soong-ui-logger",
"soong-ui-tracer",
"soong-shared",
"soong-finder",
"blueprint-microfactory",
],
srcs: [
"build.go",
"cleanbuild.go",
"config.go",
"context.go",
"dumpvars.go",
"environment.go",
"exec.go",
"finder.go",
"kati.go",
"ninja.go",
"path.go",
"proc_sync.go",
"signal.go",
"soong.go",
"test_build.go",
"util.go",
],
testSrcs: [
"config_test.go",
"environment_test.go",
"util_test.go",
"proc_sync_test.go",
],
darwin: {
srcs: [
"sandbox_darwin.go",
"util_darwin.go"
],
},
linux: {
srcs: [
"sandbox_linux.go",
"util_linux.go"
],
},
}