Skip to content

Fix mixed code precompiled libraries #611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed constants.BUILD_PROPERTIES_COMPILER_LIBRARIES_LDFLAGS
  • Loading branch information
cmaglie committed May 7, 2020
commit 934ab35e9eb4553d2a3f12cac23208fa9a8e23fd
1 change: 0 additions & 1 deletion legacy/builder/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const BUILD_PROPERTIES_BUILD_BOARD = "build.board"
const BUILD_PROPERTIES_BUILD_MCU = "build.mcu"
const BUILD_PROPERTIES_COMPILER_C_ELF_FLAGS = "compiler.c.elf.flags"
const BUILD_PROPERTIES_COMPILER_LDFLAGS = "compiler.ldflags"
const BUILD_PROPERTIES_COMPILER_LIBRARIES_LDFLAGS = "compiler.libraries.ldflags"
const BUILD_PROPERTIES_COMPILER_CPP_FLAGS = "compiler.cpp.flags"
const BUILD_PROPERTIES_COMPILER_WARNING_FLAGS = "compiler.warning_flags"
const BUILD_PROPERTIES_FQBN = "build.fqbn"
Expand Down
4 changes: 2 additions & 2 deletions legacy/builder/phases/libraries_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ func compileLibrary(ctx *types.Context, library *libraries.Library, buildPath *p
}
}

currLDFlags := ctx.BuildProperties.Get(constants.BUILD_PROPERTIES_COMPILER_LIBRARIES_LDFLAGS)
ctx.BuildProperties.Set(constants.BUILD_PROPERTIES_COMPILER_LIBRARIES_LDFLAGS, currLDFlags+"\"-L"+precompiledPath.String()+"\" "+libsCmd+" ")
currLDFlags := ctx.BuildProperties.Get("compiler.libraries.ldflags")
ctx.BuildProperties.Set("compiler.libraries.ldflags", currLDFlags+"\"-L"+precompiledPath.String()+"\" "+libsCmd+" ")

// TODO: This codepath is just taken for .a with unusual names that would
// be ignored by -L / -l methods.
Expand Down