Merge "Add empty tag support for java_import"
diff --git a/cc/config/global.go b/cc/config/global.go
index 97e423a..a170652 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -205,7 +205,7 @@
pctx.PrefixedExistentPathsForSourcesVariable("CommonGlobalIncludes", "-I",
[]string{
"system/core/include",
- "system/core/liblog/include",
+ "system/logging/liblog/include",
"system/media/audio/include",
"hardware/libhardware/include",
"hardware/libhardware_legacy/include",
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index 5c06251..774a872 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -119,9 +119,9 @@
func main() {
buildStarted := time.Now()
- c, args := getCommand(os.Args)
- if c == nil {
- fmt.Fprintf(os.Stderr, "The `soong` native UI is not yet available.\n")
+ c, args, err := getCommand(os.Args)
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error parsing `soong` args: %s.\n", err)
os.Exit(1)
}
@@ -479,14 +479,14 @@
// getCommand finds the appropriate command based on args[1] flag. args[0]
// is the soong_ui filename.
-func getCommand(args []string) (*command, []string) {
+func getCommand(args []string) (*command, []string, error) {
if len(args) < 2 {
- return nil, args
+ return nil, nil, fmt.Errorf("Too few arguments: %q", args)
}
for _, c := range commands {
if c.flag == args[1] {
- return &c, args[2:]
+ return &c, args[2:], nil
}
// special case for --make-mode: if soong_ui was called from
@@ -495,11 +495,11 @@
// TODO: Remove this hack once it has been fixed.
if c.flag == makeModeFlagName {
if inList(makeModeFlagName, args) {
- return &c, args[1:]
+ return &c, args[1:], nil
}
}
}
// command not found
- return nil, args
+ return nil, nil, fmt.Errorf("Command not found: %q", args)
}