简体   繁体   中英

How to maintain different repositories for compilation for different users ?

I don't know if my question is too obvious, too complex or even if it makes sense. I tried to find information but couldn't get any answer...

I want to mantain a SVN repo of LLVM/Clang for my user A that reflects the main repo...or equivalent: i want to compile my programs with user A calling clang/llvm and get the last version of the toolchain working to compile my sourcecode. I want to be able to update my local repo in a sense that it reflects the latest version of main LLVM repo...

BUT, i want to mantain a second SVN local repo, for user B, so when i want to modify LLVM code i'll do in user B repo. And more...if i call clang/llvm as user B, it will compile my sourcecodes using the modified version of LLVM.

In short: how can i maintain 2 repos for 2 users, that i can compile each one and, based on the user that calls clang/llvm, it will invoke the right version of binaries ?

Thanks for attention; if my question is not well-formulated, i apologize and hope someone could points me how to improve it !

Cheers...

In short...

1) If users use different machines:

Keep two different SVN repositories containing the toolchain. Each user will checkout its own repository and use the "right" compiler to compile its code. The two toolchains are located in the same directories, and each user has only one toolchain available.

2) If users share the same machine:

Keep two different SVN repositories containing the toolchain. The two toolchains are located in different directories and available at the same time. Set environment variables for the suers to specify where the toolchain is located. On Linux it can be done by setting variables in .bashrc and then using such variables in the Makefile.

In both cases, if you can, switch to git and use two branches instead of two repositories.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM