Revert "Sandbox soong_build by changing to root directory"
This reverts commit 05c25ccb4a
.
Reason for revert: broke absolute OUT_DIR
Bug: 146437378
Change-Id: I523ed79d40e1c1ef040212ba794a7a084abea75d
This commit is contained in:
@@ -76,7 +76,7 @@ func (c *cmakelistsGeneratorSingleton) GenerateBuildActions(ctx android.Singleto
|
||||
// Link all handmade CMakeLists.txt aggregate from
|
||||
// BASE/development/ide/clion to
|
||||
// BASE/out/development/ide/clion.
|
||||
dir := filepath.Join(android.AbsSrcDirForExistingUseCases(), cLionAggregateProjectsDirectory)
|
||||
dir := filepath.Join(getAndroidSrcRootDirectory(ctx), cLionAggregateProjectsDirectory)
|
||||
filepath.Walk(dir, linkAggregateCMakeListsFiles)
|
||||
|
||||
return
|
||||
@@ -147,7 +147,7 @@ func generateCLionProject(compiledModule CompiledInterface, ctx android.Singleto
|
||||
f.WriteString("# Tools > CMake > Change Project Root \n\n")
|
||||
f.WriteString(fmt.Sprintf("cmake_minimum_required(VERSION %s)\n", minimumCMakeVersionSupported))
|
||||
f.WriteString(fmt.Sprintf("project(%s)\n", ccModule.ModuleBase.Name()))
|
||||
f.WriteString(fmt.Sprintf("set(ANDROID_ROOT %s)\n\n", android.AbsSrcDirForExistingUseCases()))
|
||||
f.WriteString(fmt.Sprintf("set(ANDROID_ROOT %s)\n\n", getAndroidSrcRootDirectory(ctx)))
|
||||
|
||||
pathToCC, _ := evalVariable(ctx, "${config.ClangBin}/")
|
||||
f.WriteString(fmt.Sprintf("set(CMAKE_C_COMPILER \"%s%s\")\n", buildCMakePath(pathToCC), "clang"))
|
||||
@@ -465,7 +465,7 @@ func evalVariable(ctx android.SingletonContext, str string) (string, error) {
|
||||
}
|
||||
|
||||
func getCMakeListsForModule(module *Module, ctx android.SingletonContext) string {
|
||||
return filepath.Join(android.AbsSrcDirForExistingUseCases(),
|
||||
return filepath.Join(getAndroidSrcRootDirectory(ctx),
|
||||
cLionOutputProjectsDirectory,
|
||||
path.Dir(ctx.BlueprintFile(module)),
|
||||
module.ModuleBase.Name()+"-"+
|
||||
@@ -473,3 +473,8 @@ func getCMakeListsForModule(module *Module, ctx android.SingletonContext) string
|
||||
module.ModuleBase.Os().Name,
|
||||
cMakeListsFilename)
|
||||
}
|
||||
|
||||
func getAndroidSrcRootDirectory(ctx android.SingletonContext) string {
|
||||
srcPath, _ := filepath.Abs(android.PathForSource(ctx).String())
|
||||
return srcPath
|
||||
}
|
||||
|
Reference in New Issue
Block a user